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
I analyze data, as a consultant, for companies making important business decisions. In order to get my point across, which of th
ladessa [460]

Answer:

3

Explanation:

I've just taken the test and made a 100. 3 is the most logical answer aswell, it has more of an effect than the others.

4 0
3 years ago
Every call to a recursive function has its own code and its own set of ____ and local variables
777dan777 [17]

Answer: Parameters

Explanation:

Whenever a call to a recursive function is made, then the function has its own code and its own set of parameters with local variables. These parameters are within the scope of the recursive function. For example while finding the factorial of a number we are given the function with parameter such as int recursive(int n) where int n is a parameter passed into the function.

8 0
3 years ago
________ is a command-line utility installed in the windows\system32 folder that displays information about your windows version
Ne4ueva [31]
Im pretty sure its SystemInfo...... 
6 0
3 years ago
You must establish credit in order to buy a house true or false
iren2701 [21]

verry true, unless ou dont need a loan, if you have cash then the answer is false

8 0
3 years ago
An online survey is an effective way for an administrative professional to gather information. True False
Strike441 [17]

Answer:

True is the correct answer for the above question.

Explanation:

  • An online survey is done with the help of social sites that connects many people in conversation from all over the world. So to do an effective survey, it is best to choose the online medium.
  • The administrative professional is a professional, who works to do administrative tasks like managing the organization.
  • The above question-statement says that the online survey is the best survey, which is the correct statement, which is described above. Hence the answer is true for the above question.
7 0
3 years ago
Other questions:
  • You will start by doing a bit of research on viewfinders and LCD displays on digital cameras. After you feel that you have an un
    10·1 answer
  • On what basis can you categorize the generations of computers?
    5·1 answer
  • Why is compression a "hard problem" for computers? Draw on your own experience compressing text with the text compression widget
    12·1 answer
  • To give your app users the ability to open your app directly from other apps by clicking a link, you should use:.
    11·1 answer
  • A. Calculate the diffusion coefficient for magnesium in aluminum at 450°C.
    14·1 answer
  • Identify a stressor in your life. Conduct an internet search to locate at least two reliable sources of information on effective
    6·1 answer
  • Choose the type of error described.
    12·1 answer
  • Write a program that prompts the user to enter an oligonucleotide sequence, such as TATGAGCCCGTA.
    7·1 answer
  • Your _______ can help block inappropriate content online.<br> 1. web browser<br> 2. Password
    14·1 answer
  • Emily is deciding whether to buy the same designer jacket her friends have. The jacket is much more expensive than a similar one
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!