Three Kinds of Numbers
Python
15 pts
Three Kinds of Numbers
Create three variables:
x=7(int)y=2.5(float)z=3j(complex)
Print the type of each one, in that order. Then print x + y.
Expected output:
<class 'int'> <class 'float'> <class 'complex'> 9.5
Checklist
- Keep
x = 7as an integer. - Create
yas the float2.5. - Create
zas the complex number3j. - Print the type of
x,yandz, thenx + y.
🔑 Solution
If you view the solution before passing, you earn half points for this exercise. You still need to type it and press Check to finish.
How it works, step by step
Point at a step to highlight its lines. Type the solution yourself and press Check answer to finish.
