132k views
2 votes
Write code that prints: Ready! numVal ... 2 1 Start! Your code should contain a for loop. Print a newline after each number and after each line of text Ex: numVal

1 Answer

3 votes

Answer:

Written in Python

numVal = int(input("Input: "))

for i in range(numVal,0,-1):

print(i)

print("Ready!")

Step-by-step explanation:

This line prompts user for numVal

numVal = int(input("Input: "))

This line iterates from numVal to 1

for i in range(numVal,0,-1):

This line prints digits in descending order

print(i)

This line prints the string "Ready!"

print("Ready!")

User Samuel Ramzan
by
5.2k points