Guest User

Untitled

a guest
Feb 18th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. # I wrote this main() to call the highest_temperature function above.
  2. def main():
  3. """Create a list of temperatures and call a function to find the highest."""
  4.  
  5. # Initialize the temperature list.
  6. some_temps = ["", "", "", "", "", ""]
  7.  
  8. # For each index in 'some_temps' get a temperature from the user.
  9. for i in range(len(some_temps)):
  10. some_temps[i] = float(input("Give me a random temperature from the last few weeks: "))
  11.  
  12. # Set highest_temp equal to the returned value from
  13. # the highest_temperature function.
  14. highest_temp = highest_temperature(some_temps)
  15.  
  16. # Print the highest temperature.
  17. print(highest_temp)
  18.  
  19. main()
Add Comment
Please, Sign In to add comment