Back

Python exercise to convert celsius to Fahrenheit

Created 1 year ago
317 Views
3 Comments
HrishikeshARRdEy
@HrishikeshARRdEy
HrishikeshARRdEy
@HrishikeshARRdEyProfile is locked. Login

Hi, can you help me with this question:

You are given with a number A i.e. the temperature in Celcius. Write a program to convert this into Fahrenheit. 

Note: In case of decimal values, round-off to two decimal places.

my code:

Celcius = 0
Fahrenheit = (Celcius * 1.8) + 32
answer = Fahrenheit
answer = str(round(answer, 2))
print(answer)

(satisfies condition one but not two. cant satisfy both conditions at the same time)

Comments (3)
Please login to comment.