62.5k views
4 votes
Print air_temperature with 1 decimal point followed by C. Sample output with input: 36.4158102 36.4C (python)

User Mccc
by
4.4k points

1 Answer

2 votes

Answer:

hope this helps

Step-by-step explanation:

#Read the value from keyboard and parse to float

#assign the value to air_temperature

air_temperature=float(input())

#Print the air_temperature with one decimal place to right with C

print('%.1fC'%air_temperature)

#where f is a format specifier .1 is number of decimal places to display on right side

#C is the character to print after the decimal value

User Satish Shinde
by
3.6k points