Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Modify code
#1
how do i modify the following program so that it computes and prints a table of celsius temperatures and the fahrenheit equivalent every 10 degrees from 0C to 100C


Converter.py
#   A program to convert Celsius temps to Fahrenheit

def main():

    print("This program converts Temperature readings")
    print("from celsius to fahrenheit")

    celsius = eval(input("what is the celsius temperature? "))
    
    
    fahrenheit = (9/5 * celsius + 32)
    print("The temperature is", fahrenheit, "degrees Fahrenheit.")
        
main()
Reply


Messages In This Thread
Modify code - by BlackPimpernel - Mar-31-2018, 03:32 PM
RE: Modify code - by Larz60+ - Mar-31-2018, 09:05 PM
RE: Modify code - by BlackPimpernel - Apr-02-2018, 01:51 PM
RE: Modify code - by snippsat - Apr-02-2018, 03:48 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Modify code from running program ? samuelbachorik 2 2,536 Jun-26-2020, 08:17 PM
Last Post: samuelbachorik
  How To Modify This Code?? digitalmatic7 6 4,268 Nov-18-2017, 04:49 PM
Last Post: digitalmatic7

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020