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
KonstantinChe [14]
3 years ago
7

Write an algorithm that read a number from the user “assuming the number entered is always between 1-100”, when the number enter

ed is greater than 50, a variable X is incremented by 1, otherwise, a variable Y is incremented by 1. After that check the value of X and Y, if X is greater than Y then print (Most of your numbers are greater than 50), otherwise print (Most of your numbers are less than or equals to 50), Hint: the program stops when the user entered number 0
Computers and Technology
1 answer:
AveGali [126]3 years ago
6 0

import sys

number = int (input ("Enter a number between 1 to 100 : "))

x = 0

y = 0

if number == 0:

 sys.exit()

if number > 50:

 print("Increment x value")

 x=x+1

else:

 print("Increment y value")

 y=y+1

if x > y:

  print("Most of your numbers are greater than 50")

else

  print("Most of your numbers are less than or equals to 50")

Explanation:

In this algorithm the User is asked to input the number.

If the input number is 0 then the user will exit the algorithm

If the input number is greater than 50 then  X variable is incremented by 1

If the input number is less than 50 then the variable  Y is incremented by 1

Then X and Y values are compared,if the value of x is greater than y then

and print command will print Most of your numbers are greater than 50

If the value of Y is greater than X then print command will print Most of your numbers are less than or equal to 50

You might be interested in
In order to send a photo in a text message from your cell phone to your cousin's cell phone who lives in New Zealand, is it nece
Nata [24]

Answer: No, because all you need is WiFi for both devices and a messaging app to do it for free like iMessage.

Explanation: Please correct me if I am wrong! :)

8 0
3 years ago
Match the description to the step in troubleshooting.
Digiron [165]
It should go 4 5 3 2 1
5 0
3 years ago
A _______ is a hierarchical list of folders that shows the arrangement of data stored on a windows computer.
olasank [31]

A directory tree is a hierarchy of directories that consists of a single directory, called the parent directory or top level directory, and all levels of its subdirectories (i.e., directories within it).

For more information :)
http://www.linfo.org/directory_tree.html
4 0
3 years ago
A company that manufactures machine parts orders a new system that makes products at ten times the speed of the earlier machine.
kirill [66]
"Self-management" This is a huge clue. c:
Your answer: Autonomic Computing.
Autonomic Computing refers to "Self-management." 
7 0
3 years ago
Read 2 more answers
Who created the word robot?
victus00 [196]

Answer:

Karel Čapek      Science Diction: The Origin Of The Word 'Robot' Robot is a relative newcomer to the English language. It was the brainchild of the Czech playwright, novelist and journalist Karel Čapek, who introduced it in his 1920 hit play, R.U.R., or Rossum's Universal Robots.

Explanation:

5 0
3 years ago
Read 2 more answers
Other questions:
  • Mary is entering her senior year of college. She has a meeting on Friday with her advisor to discuss her career plans.Mary is al
    15·1 answer
  • Anyone want to join my dîšćòrd
    8·2 answers
  • Which actions should be taken so that transitions proceed automatically? Check all that apply.
    12·2 answers
  • By default, PowerPoint ends a slide show with a black slide. <br> a. True<br> b. False
    5·2 answers
  • You work in the Accounting department and have been using a network drive to post Excel workbook files to your file server as yo
    15·1 answer
  • COMPUTER CODING
    5·1 answer
  • Java Programming Using nested if statement For a student to be accepted in XYZ College, the student must meet the following requ
    5·1 answer
  • Identify what a computer needs to
    14·1 answer
  • What are variables in Q Basic programs​
    14·1 answer
  • Which of the following terms refers to the area of the hard drive used for virtual memory?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!