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
Which of the following processes demonstrates that matter is made up of minute particles? (A) Difussion (B) Capillarity (C) Dist
Orlov [11]

Answer:

Evaporation

Explanation:

Evaporation is when water gets transferred from an object to the sun by thermal energy which is produced by the Sun. Evaporation can also be caused when heat causes water vapour to come, and it gets evapprated by the Sun and thermal energy. Each particle moves at once, so when this technology gets incurred on the Sun, it becomes an example.

8 0
3 years ago
How to make changes to a file on the USB drive
Troyanec [42]
Um put ur usb drive in to your computer and change your files like that :)
8 0
3 years ago
Read 2 more answers
I am writing a Python code to ask a user to enter students' information including name,
White raven [17]

Answer:

student_file = {}

endf_input = '1'

for x in iter(list, 1):

   name = input("Enter a student name: ")

   st_id = int(input("Enter a student id number: "))

   student_file[name] = st_id

   endf_input = input("Add more student to file (type 1 for yes and 0 to end): ")

   if endf_input == '0':

       break

print("Search for Student")

search = int(input("Enter student id: "))

if search == 0:

   print("Sorry, no student with id of zero.")

   quit()

for key, value in student_file.items():

   if value == search:

       print(f"Student name: {key}")

Explanation:

The program source code uses a for loop to continuously add data to the student file dictionary structure but breaks from the loop when a zero is received as input. The program enters search mode and returns the name of the student with the searched id number.

7 0
3 years ago
Some hardware can be added to the computer without having to restart or power down the computer. After a short period of time th
Alja [10]

Answer:

The answer is "Option c"

Explanation:

Plug and Play is a general term that is used to define gadgets operating with a computer network while connected to it. This technology allows the hardware to use automatically by adding it, and other option can be described as follows:

  • In option a, This technology is used in monitoring the commercial vehicles system, which is why it's incorrect.
  • In option b, It is wrong because It is used in Microsoft Windows, which increases the physical security.
  • In option d, It describes the details about the hardware and switches to configure the device, that's why it is incorrect.
5 0
3 years ago
While traditionally employers used computers to track ordering and inventory, computers are used now to
AlexFokin [52]

Answer:

The correct answer should be A. automate merchandise ordering and inventorying.

5 0
4 years ago
Other questions:
  • This type of connection uses radio waves to connect devices on a network.
    9·2 answers
  • What is the part of the computer system that receives inputs, directs those inputs to the processor, and redirects the processed
    14·1 answer
  • What is the difference between a fiber optic cable and a twisted pair cable?
    5·1 answer
  • A single point of failure is a piece of hardware or application that is key to ________________________.
    8·1 answer
  • When you are using inprivate browsing, the "inprivate is turned on" page displays in the browser window, the inprivate label is
    14·1 answer
  • A cable that connects the computer to the printer is an example of<br> A.hardware<br> B.software
    13·2 answers
  • This is a type race kindly join.
    11·1 answer
  • Explain four sitting postures in a computer laboratory​
    9·1 answer
  • If you want the input gear to spin in the same direction as the output gear you must use a _______ gear.
    13·1 answer
  • IT ethics are rules, policies, or principles that guide the behavior of IT professionals.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!