176k views
5 votes
If you enter 1 2 3 in three separate lines, when you run this program, what will be displayed? print("Enter three numbers: ") number1 = eval(input()) number2 = eval(input()) number3 = eval(input()) # Compute average average = (number1 + number2 + number3) / 3 # Display result print(average)

User Jedison
by
4.6k points

1 Answer

3 votes

Answer:

Step-by-step explanation:

If you enter (1 2 3)

The program takes the first input and call it number1=1

The program takes the second input and call it number2=2

The program takes the third input and call it number3=3

Then the program is meant to add number1 to number2 and to number3

Number1+number2+number3=1+2+3=6

After that the programs take the average of this number by dividing it by 3

I.e

Average=(Number1+number2+number3)/3

Average =6/3

Average =2

The program will display the result average as "2"

User Jon Goodwin
by
5.1k points