This is because you put the input()
function inside the print statement.
As you wrote, you need to enter input()
to complete the entire string, and then execute the print statement.
a # Input value to pass to the input() function
12 chances. Enter letter: A completed string after passing the input value to the a# input() function
Because the input()
function is a function that outputs a string before receiving an input when passed to a parameter, you can use input()
itself instead of using print.
count = 12
while count > 0:
input(str(count) + 'chances. Enter a letter: ')
count -= 1
© 2024 OneMinuteCode. All rights reserved.