0
Times up quiz has error
In the basic python course I supplied this code and was told it was incorrect. When I run it I get the correct answer. import time # Take the number as input number = int(input("Enter the number of seconds: ")) print(f"Starting countdown from: {number}") # Debugging line # Use a while loop for the countdown while number >= 0: # Ensures the countdown reaches 0 print(number) # Print the current number time.sleep(1) # Pause for 1 second number -= 1 # Decrement the counter
5 ответов
+ 6
Dismissed the extra print stuff you only need the print(number)
No Enter the number in seconds
No print( f-string )
c = int(input())
while c >= 0:
print(c)
c -= 1
+ 4
Rikk Sullenberger you made this harder than the practice required.
# take the number as input
number = int(input())
#use a while loop for the countdown
while number >= 0:
print(number)
number -=1
Yes your code works but ...
+ 3
the quiz's time is not referring to actual time. there's no need for time.sleep()
also, Sololearn will kick out your code if runs for more than a few seconds...
0
Actually, i removed the count down and still had issues.
0
Sorry, the delay