Ask Question
18 March, 22:30

Write code that prints: Ready! firstNumber ... 2 1 Run!

Your code should contain a for loop. Print a newline after each number and after each line of text.

Ex: userNum = 3 outputs: Ready! 3 2 1 Run!

+3
Answers (1)
  1. 19 March, 01:38
    -1
    The program to this question can be defined as follows:

    Program:

    num=int (input ("Enter any number: ")) #defining variable num, that take value from user

    val=0; #defining variable val

    for i in range (num) : #defining loop to calculate value in decreasing order

    val=num-i; #holding value in variable

    print (val) #print value

    Output:

    Enter any number: 3

    3

    2

    1

    Explanation:

    In the above-given code, a variable "num" is declared, that uses input function to take value from the user end, in the next line a "val" variable is defined, that calculates values and print it in decreasing order.

    In the next step, a for loop is declared, inside the loop a "val" variable uses num and loop variable "i" to calculate the value in decreasing order. In the last print method is used that prints "val" variable value.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “Write code that prints: Ready! firstNumber ... 2 1 Run! Your code should contain a for loop. Print a newline after each number and after ...” in 📘 Computers and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers