Well done!
You have completed Type Conversion in Python: Implicit and Explicit Conversions, Combining Data Types, and Best Practices Quiz!
Quiz Question 1 of 5
If a Python program reads two values using input()
and attempts to add them without any type conversion, what will be the outcome and why?
Choose the correct answer below:
-
A
The values will be added as integers because Python automatically converts them.
-
B
The result will be a float if one of the inputs is a decimal number.
-
C
The two strings will be concatenated together because
input()
returns string values. -
D
The program will crash because addition between strings and integers is not allowed.