Ask Question
9 June, 15:34

Write a program that creates an array called temperatures and then add five temperatures input from the keyboard. Then, print the array.

Sample Run

Enter a temperature: 45

Enter a temperature: 67

Enter a temperature: 89

Enter a temperature: 47

Enter a temperature: 89

[45, 67, 89, 47, 89]

+1
Answers (1)
  1. 9 June, 18:26
    0
    temperatures = []

    number1 = int (input ("Enter a temperature: "))

    number2 = int (input ("Enter a temperature: "))

    number3 = int (input ("Enter a temperature: "))

    number4 = int (input ("Enter a temperature: "))

    number5 = int (input ("Enter a temperature: "))

    temperatures. append (number1)

    temperatures. append (number2)

    temperatures. append (number3)

    temperatures. append (number4)

    temperatures. append (number5)

    print ("Enter a temperature: " + str (number1))

    print ("Enter a temperature: " + str (number2))

    print ("Enter a temperature: " + str (number3))

    print ("Enter a temperature: " + str (number4))

    print ("Enter a temperature: " + str (number5))

    print (temperatures)
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “Write a program that creates an array called temperatures and then add five temperatures input from the keyboard. Then, print the array. ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers