computer science...answer please?

What kind of datatype is being input for Number1, Number2, Number3?


Number1=input("Enter Number1 = ")

Number2=input("Enter Number2 = ")

Number3=input("Enter Number3 = ")


print ("Number1 is equal to ",Number1)

print ("Number2 is equal to ",Number2)

print ("Number3 is equal to ",Number3)

print ("The sum is ",Total)

avg = Total/3

print ("The Average is = ", avg)

1 Answer

  • Anonymous
    1 month ago

    Each of the variables will be a string, because the input function returns a string. Even though they are called Number, they will be strings.

    So Total will be the the strings appended to each other. If the user enters "1", "2", and "3" then Total is "1"+"2"+"3"="123". Not 6.

    • Commenter avatarLog in to reply to the answers
Still have questions? Get answers by asking now.