1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
AlekseyPX
3 years ago
12

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

e 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]
Computers and Technology
2 answers:
levacccp [35]3 years ago
8 0

Answer:

x=[]

i=0

for i in range(0,5):

   x.append(input("Enter the temperature"))

print(x)

   

Explanation:

The above is the required program in python. Here, we have used a list and added to it five temperatures, and then printed it out, as mentioned. Its the plus point of python, that we are not required to give the dimensions of the list. Not all programming languages provide this facility. Remember in Java we are required to make use of the ArrayList and not array fo dynamic output.

Vesnalui [34]3 years ago
4 0

Answer:

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)

Explanation:

You might be interested in
Which one of the following business names would be rated Incorrect for name accuracy? Answer McDonald's McDonald's H&M McDon
Damm [24]

McDonald's H&M McDonalds Inc is incorrect for name accuracy.

Explanation:

The correct Name is McDonald's. But Mc Donald's H&M and McDonalds inc is incorrect for name accuracy.

McDonald's is a fast-food company based in America. It has its retail outlets throughout the world. It is very famous for its burgers and french fries. It is the world's second-largest employer in the private sector. It is a symbol of globalization as it has its outlets throughout the world.

6 0
3 years ago
A file to which information is written is referred to as a(n) ____ file.
Iteru [2.4K]
The answer is <span>output.  </span>A file to which information is written is referred to as an output file.  It is  <span>a computer </span>file<span> that contains data that are the </span>output<span> of a device or program. </span>
4 0
2 years ago
Select the correct answer.
miv72 [106K]

Answer: Format

Explanation: My head

3 0
2 years ago
Read 2 more answers
Please select the word from the list that best fits the definition
Tasya [4]

Answer:

d

Explanation:

because it is

3 0
3 years ago
Read 2 more answers
A Pool charges $4 each visit,or you can buy a membership. Write and solve an inequality to find how many times a person should u
MAXImum [283]
$4 x number of visits (V)> price of membership (M)
V > M/4
8 0
3 years ago
Other questions:
  • Because you do not know every possible future use for the data TerramEarth collects, you have decided to build a system that cap
    15·1 answer
  • The main advantage of a solid state drive is:
    5·1 answer
  • Complete the function void update (int *a, int *b), which reads two integers as argument, and sets a with the sum of them, and b
    8·1 answer
  • A______ is a graphical representation of numeric data.
    8·1 answer
  • The method needed to arrange for an object to be notified when a window's close-window button has been clicked is
    6·1 answer
  • What command would you use to add a file to an e-mail message?
    15·2 answers
  • List at least 5 features that can be used to format a report in word 2013
    6·1 answer
  • My computer screen keeps flashing black, it's on a very low brightness level and I very rarely put it up to high level unless I
    13·2 answers
  • Fix the code :)
    10·1 answer
  • 45 points!
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!