Answer the question
In order to leave comments, you need to log in
How to make a limited number of loop execution?
import time
while 3:
time.sleep(0.5)
print('СЛОВА: Привет, Пока, Пошли')
look = input()
time.sleep(0.5)
if look == 'Привет':
print('Hello my friend')
elif look == 'Пока':
print ('bye my friend')
elif look == 'Пошли':
print('let`s play together')
Answer the question
In order to leave comments, you need to log in
Read about the basics of python!
for i in range(3):
print(i)
The while loop checks if the condition is true, and any number other than 0 is considered true, while 3: this is an infinite loop
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question