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]
4 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]4 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
If you’re the victim of cyber bullying behavior, besides contacting your teacher or the school, where else can you go to find in
RideAnS [48]

parents

childline

ceop

family

3 0
3 years ago
Which of the following statements about federal student loans is true?
never [62]
The correct answer is a.<span>) the interest rate on your loan will be fixed over time. 
</span>
7 0
4 years ago
WILL MARK BRAIN LIST!
Maslowich
I think it’s a

if it isn’t a then it’s d
6 0
3 years ago
Read 2 more answers
This is a random question, it’s not about computers or technology
ivann1987 [24]

Answer:

Explanation:

There’s only an AngelKittenn583

To delete in an account ,you must sign into it with the email and password, go into your setttings, and find the “Delete Account” Button

4 0
3 years ago
The byte-ordering scheme used by computers to store large integers in memory with the high-order byte at the lowest address is c
Ostrovityanka [42]

Answer:

a. big endian      

Explanation:

  • Endianness determines the order of how the multiple bytes of information are stored in the memory.
  • Big-endian is a byte ordering scheme in which the most significant byte also called the big end of data is stored at the the lowest address.
  • First byte is the biggest so Big-endian order puts most significant byte first and least significant byte in the last.
  • For example: A hexadecimal number 1D23 required two bytes to be represented so in big endian order this hexadecimal number will be represented as 1D 23.
4 0
4 years ago
Other questions:
  • Press the ____ key(s) to erase one character to the left of the insertion point.
    10·2 answers
  • Which type of security threat installs to a computer without the user's knowledge and then monitors all computer activity?
    12·2 answers
  • The producer thread will alternate between sleeping for a random period of time and inserting a random integer into the buffer.
    7·1 answer
  • Select the best answer for the question. 2. What is the simplest way to permanently get rid of an unwanted file?
    13·1 answer
  • ¿Es especial que mi cumpleaños sea el día de San Valentín?<br><br> si o no
    11·2 answers
  • When Lisa purchased her house the mortgage lender required homeowners insurance to cover 100% of the loan amount. After many yea
    7·2 answers
  • Which of the following devices are least likely to deny a connection inline when an attack is detected? (select 2)
    6·1 answer
  • Kim is creating a PowerPoint
    13·1 answer
  • Which Packet Tracer feature do you think will be most helpful for you in learning how to manage a network
    5·1 answer
  • Write a python code for a calculator
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!