Consider this program: Cost1 = input("Please enter the first expense: ") Cost2 = input("Please enter the second expense: ") print("Your total for both expenses was", Cost1 + Cost2) If the user inputs “10” for the first expense and “20” for the second expense, what will the interpreter show in the final line when this program is run? If this result in not what the programmer intended, how would you explain what went wrong?

Respuesta :

it will show '1020'

the inputs dont know that youre putting in numbers. When it adds the inputs together, it just shows them side by side.

Answer:

The inputs will not be treated as integers or floats unless specified to do so. They will be strings by default and treated as text characters - so the output is 1020.

Explanation:

My teacher even said this to me so this is the answer.