Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # I wrote this main() to call the highest_temperature function above.
- def main():
- """Create a list of temperatures and call a function to find the highest."""
- # Initialize the temperature list.
- some_temps = ["", "", "", "", "", ""]
- # For each index in 'some_temps' get a temperature from the user.
- for i in range(len(some_temps)):
- some_temps[i] = float(input("Give me a random temperature from the last few weeks: "))
- # Set highest_temp equal to the returned value from
- # the highest_temperature function.
- highest_temp = highest_temperature(some_temps)
- # Print the highest temperature.
- print(highest_temp)
- main()
Add Comment
Please, Sign In to add comment