Python 3.13 How to print a number in a string?
Around my assignments I ask the person to input several, then Let me use the number increase 10000, next print the item out.My code appears this:
var=input(“Please enter how much you intend to bet:”)
prize=var+10000
print(“You own $” + prize + “now! “)
But WE get an error message claims “TypeError:Cannot convert ‘int’ object to str implicitly”.
Can easily somebody help me you need to I use Python 3 OR MORE.13.Thanks a ton very a great deal!
Your offline line should resemble this:
print(“You own $” + str(prize) + ” at this point! “).
Leave a Reply
You must be logged in to post a comment.