Python Forum
Using a range and for loop - temp converter
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Using a range and for loop - temp converter
#2
this line
print("The temperature is", fahrenheit, "degrees Fahrenheit.")
is not part of the loop, so it prints only last temperature. Correct the indentation and it will work as expected.
Reply


Messages In This Thread
RE: Using a range and for loop - temp converter - by buran - Jan-20-2017, 06:20 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  My first temperature converter TheLowEndTheory 7 3,701 Oct-18-2020, 04:39 PM
Last Post: buran
  How can I run a function inside a loop every 24 values of the loop iteration range? mcva 1 2,215 Sep-18-2019, 04:50 PM
Last Post: buran
  Temperature converter Help (ASAP) Edison_Weng 1 2,931 Apr-16-2018, 01:55 PM
Last Post: stranac
  Debugging error, while loop out of range zenort 1 4,061 Feb-14-2018, 03:36 PM
Last Post: zenort
  Temp Converter with Kelvin vader33 7 12,473 Oct-02-2016, 05:16 AM
Last Post: vader33

Forum Jump:

User Panel Messages

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