ellie gameraimer
@ellie442
football and speedrunning
0
GUESS THE NUMBERBasically the computer thinks of a number between 1 and 10, you have to guess it in 5 attempts. Hot means your guess is too high, cold means it is too low. I made this program for a school lesson.
0
0
0
join my discord at https://discord.gg/qBztfxM
also if self promotion is not allowed then sorry!
there is actually some code below <3
!
!
!
v
Python
Im trying to move the program from the first bit to the text that appears on screen, but it wont work. What do I do? Sorry I'm not a very experienced
Python
19ecal I would define animate_text like so, using print()'s optional parameter of end, which tells print what to put after the text it prints when it is called, which is by default a newline (\n):
def animate_text(text):
from time import sleep
for i in range(len(text)): #Repeats for however many characters there are in the text
print(text[i], end="") #Prints the current character of the text followed by an empty string using end
sleep(0.02) #Waiting to print out the next character
Then you 2 years ago
I have written this program (Its the start of a game) and when i press a it doesnt move onto the next bit???? its probably just a silly mistake but ca
Python
ellie442 i know i sound really dumb but can anyone show me in actual code how to resolve this? thanks2 years ago
badst Escape the while loop from the function animate_text. The loop isn't running because you aren't calling the function anywhere in your code!
2 years ago
InvisibleOne It doesn't start because your while true loop is tabbed beneath your function. Untab your while True so it is outside the function and it should work2 years ago
for classsssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss
Python