Jak napisać trochę czasu w Pythonie
myvariable = 10
while myvariable > 0:
print(myvariable)
myvariable -= 1
Thoughtful Trout
myvariable = 10
while myvariable > 0:
print(myvariable)
myvariable -= 1
# do while sample loop in python
# do statements in try while number is < 0
i = 0
number = -1
while number < 0:
try:
number = int(input("Enter a number: "))
print(number)
i += 1
except ValueError:
print("Invalid input")