1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Ulleksa [173]
4 years ago
14

5.19 LAB: Countdown until matching digits Write a program that takes in an integer in the range 20-98 as input. The output is a

countdown starting from the integer, and stopping when both output digits are identical. Ex: If the input is:
Computers and Technology
1 answer:
elena55 [62]4 years ago
3 0

Answer:

Following are the code to this question:

x = int(input())#defining a variable x for user input value  

if(x>=20 and x<=98):#defining an if block that checks value is in between 20 to 98  

   while(not(x%10==x//10)):#defining while loop that seprate numbers and checks it is not equal  

       print(x)#print value

       x-=1# decrease value by subtracting 1

   print(x)# print value

else:#defining else block  

   print("The input value must lie in 20-98")#print message

Output:

36

36

35

34

33

Explanation:

  • In the above python program code, a variable x is declared, which is used to input the value from the user end.
  • In the next step, a conditional statement is used in if block, it checks the input value is lie in 20 to 98, and to check its uses and logic date, if it is false it will goto else section in this, it will print a message.
  • If the given value is true, inside if block a while loop is declared, that separately divide the value and check it is identical or not, if it is not identical it will print the value and checks its less value similarly.
You might be interested in
People must use Telepresence when Virtually meeting with a group of coworkers true or false
Norma-Jean [14]
I believe the answer is false
7 0
4 years ago
So what do I do if it doesn't take me to the sign up page? I
vesna_86 [32]

Answer:

Try to restart the computer or something.

Explanation:

8 0
3 years ago
The software that controls the computer hardware and establishes standards for developing and executing applications best descri
victus00 [196]
An operating system such as windows or macos
4 0
4 years ago
Select the correct answer.
sveticcg [70]

Answer:

D

Explanation:

5 0
4 years ago
Read 2 more answers
HELP ASAP
saw5 [17]

When associating an event handler with a button click which event occurs  the user hits the right mouse button, the outcome, if any, is That hurt.

How can the result be established?

The flow of the programme indicates that:

When the user presses the button, the application prints "That hurt" without any quotation marks.

This operation may be found in the third line of the programme.

Therefore, the outcome is (b) That hurt if the user clicks the right mouse button.

Details on the programme are available at:

brainly.com/question/16397886

#SPJ4

7 0
1 year ago
Read 2 more answers
Other questions:
  • Where does most of the work in creating a presentation will take place? Either formatting toolbar, normal (Slide) view, slide so
    12·2 answers
  • Write a program that converts or calculates values. Use the following guidelines to write your program:
    8·1 answer
  • A printer is displaying no images on its LED panel. What can a technician do to troubleshoot the situation? Choose two answers.
    6·1 answer
  • The effects of activating the complement system include all of the following except
    14·1 answer
  • For each of the descriptions below, perform the following tasks:
    6·1 answer
  • How to change the size of my document in cs6?
    13·1 answer
  • What does t'challa actions reveal about his character( black panther movie)​
    6·1 answer
  • What is a spark line? how is a different a chart​
    14·1 answer
  • Write convert() method to cast double to int Complete the convert() method that casts the parameter from a double to an integer
    12·1 answer
  • Which of the following is the primary difference between analog and digital communication?
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!