Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.
Trending News
python concatenating strings question?
i have set a variable named guessesTaken, and the value is 0
im designing a guess my number game so its set up like this, where the user gets 6 guesses, and my variable is:
guessesTaken = 0
now what i have to do is show the number of guesses after each step, which i had as
print(guessesTaken) and that shows the number, but i cant for some reason figure out how to print out (guessesTaken) out of 6 guesses used. so after the guess it says (guessesTaken) out of 6 guesses taken.
ive tried this:
print((guessesTaken) + 'out of 6 guesses used')
and that wont work either. help!
3 Answers
- Herp-da-DerpLv 57 years ago
Here's the code -
Tip - to avoid yahoo suggesting the reptiles section as best fit category; mention programming in the title. For example "Python programming - concatenating strings question"