What int do I need to convert? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
12th Feb 2018, 8:15 AM
Raphael Shay
Raphael Shay - avatar
4 Answers
+ 2
print("You lost " + str(100 - coins) + " Now you have " + str(coins) + ".") elif coins == 100: print("You haven't lost or won any money!") else: print("You made" + str(coins - 100) + "! Now you have " + str(coins)) You need to convert total part of int into str. Part conversation will throw error in concatenation
12th Feb 2018, 8:55 AM
Debasish Mukherjee
Debasish Mukherjee - avatar
+ 2
I think, I'm not actually getting your point exactly. The correct version of the code is below, hope that gives your answer https://code.sololearn.com/cz2kXElTxKC5/?ref=app
13th Feb 2018, 6:35 AM
Debasish Mukherjee
Debasish Mukherjee - avatar
+ 1
Is what you wrote corrected or like the original?
13th Feb 2018, 5:55 AM
Raphael Shay
Raphael Shay - avatar
+ 1
Thanks!
13th Feb 2018, 7:58 AM
Raphael Shay
Raphael Shay - avatar