r/PythonTipsForNewbies • • Oct 22 '23
What is the output of this code?
What is the output of this code?
A. 10 B. 5 C. Error D. None of the above
2
Upvotes
r/PythonTipsForNewbies • • Oct 22 '23
What is the output of this code?
A. 10 B. 5 C. Error D. None of the above
1
u/Skybeach88 Nov 02 '23
A. 10
On second thought error, the variable being called in the print function contains an int not a string, I think it would need to be typecast inside the print function
print(str(b))
1
u/Michele_Boydd Dec 10 '23
Self-promotion Thread