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.

Erica asked in PetsReptiles · 7 years ago

python concatenating strings question?

Update:

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.

Update 2:

ive tried this:

print((guessesTaken) + 'out of 6 guesses used')

and that wont work either. help!

3 Answers

Relevance
  • 7 years ago

    Here's the code -

    http://pastebin.com/GWd0UuBb

    Tip - to avoid yahoo suggesting the reptiles section as best fit category; mention programming in the title. For example "Python programming - concatenating strings question"

  • 7 years ago

    How is this reptile related?

  • 7 years ago

    this is not reptile TAKE IT DOWN

Still have questions? Get your answers by asking now.