CONCEPTS IN PRACTICE
Integers, floats, and strings
Assume that \( x=1, y=2.0 \), and \( s=" 32 " \).
1. What is the output of the following code?
print( \( x \), type( \( x \) ))
a. 1 'int'.
b. \( 1.0.
c. \( 1.
2. What is the output of the following code?
print ( \( y \), type( \( y \) ))
a. \( 2.0
b. \( 2.0
c. \( 2
3. What is the type of the following value?
"12.0"
a. string
b. int
c. float
Solución de tutoría real
Responder
Solución
Revisado y aprobado por el equipo de tutoría de UpStudy
Extra Insights
When you run `print( x, type( x ))` with \( x=1 \), the output will be **1