Respuesta :

Answer:

print("i="+str(iVal)+" f="+str(fVal))

Explanation:

Given

[tex]iVal = 5[/tex]

[tex]fVal = 2.4[/tex]

See attachment

Required

Write a statement that outputs i=5 f=2.4

From the output format, the following should be noted.

- i = and f= are string literals, so they will be in double quotes in the print statement

- 5 and 2.4 represent the values of iVal and fVal respectively

- We will make use of + (concatenation operator) to concatenate all data to be printed

So, the print statement (in Python) is:

print("i="+str(iVal)+" f="+str(fVal))

The function of the str keyword as used above is to convert iVal and fVal to string values, so that the print statement will be executed without error

Ver imagen MrRoyal