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
Goryan [66]
3 years ago
11

Write a function named "higher_lower" that takes an int as a parameter and returns "higher" if 14 is greater than the input and

"lower" if 14 is less than the input, and "correct" if 14 is equal to the input.
Computers and Technology
1 answer:
Butoxors [25]3 years ago
4 0

Answer:

Following are the program in python language for the above question:

Explanation:

Program :

def higher_lower(value): #function definition.

   if(value<14): #if condition for 14 is greator than the input.

      return "higher"

   elif(value==14): #else if condition for 14 is equal to the input.

       return "correct"

   else:# else condition.

       return "lower"  

return_value = higher_lower(int(input("Enter the integer value: "))) #take the value from the user and call the function.

print(return_value)# print the returned value.

Output :

  • If the user gives the input as 4, it will prints higher.
  • If the user gives the input 15, it will prints lower.

Code Explanation:

  • The above code is in python language, In which the first line will instruct the user, take the input and pass to the function after converting it into an integer.
  • Then the first line of the function is used to check the value is less than 14 or not.
  • Then the else if condition checks that the value is equal to 14 or not.
  • Then the else condition will be true if the value is greater than 14.
You might be interested in
palindrome is a string that reads the same forwards as backwards. Using only a xed number of stacks, and a xed number of int and
bixtya [17]

Solution :

check_palindrome$(string)$

   lower_$case$_string$=$ string$. to$_lower()

   Let stack = new Stack()

   Let queue = new Queue();

   for each character c in lower_case_string:

       stack.push(c);

       queue.enqueue(c);

   let isPalindrome = true;

   while queue is not empty {

       if (queue.remove().equals(stack.pop())) {

           continue;

       } else {

           isPalindrome=false;

           break while loop;

       }

   }

   return isPalindrome

Input = aabb

output = true

input =abcd

output = false

6 0
3 years ago
(Correct Answer Recieves Brainliest)
astraxan [27]

Answer:

D

Explanation:

3 0
3 years ago
Read 2 more answers
In apersuasive message, opposing ideas should be:
zubka84 [21]

Answer:

b- Cited,then refuted

Explanation:

Citation enhances persuasion of information sources.

Refutation means understanding the viewpoint of the opposition and then countering it by providing respective evidence  or by finding mistakes in the logic of the opposition's argument.

8 0
3 years ago
Which is the best and quickest way for Jim to share his scuba experience with everyone?
iren [92.7K]
Option B

Blog is the best way
7 0
3 years ago
Suppose that a program asks a user to enter multiple integers, either positive or negative, to do some calculation. The data ent
KatRina [158]

Answer:

d) An alphabetic character

7 0
3 years ago
Other questions:
  • When approved for a loan, an individual essentially applied for aid in the area of...
    15·1 answer
  • Suppose a retailer who has no technology expertise wishes to set up an online presence for his business. He ________. a. ​can us
    6·1 answer
  • During the past decade ocean levels have been rising faster than in the past, an average of approximately 3.1 millimeters per ye
    14·1 answer
  • Find the 65th percentile from the data. The data consist of class interval from 0-10, 10-20, 20-30, 30-40, 40-50, 50-60 and freq
    8·1 answer
  • If the base-10 system stops with the<br> number 9, then why isn't it called<br> base-9?
    15·1 answer
  • The information stored in the _____ is used by the DBMS for a recovery requirement triggered by a ROLLBACK statement, a program'
    7·1 answer
  • Can you install Ubuntu on a hard drive by porting from the folder to the HDD?
    10·1 answer
  • Write a program called array1.cpp file that use either regular for loop or range based for loop to display the contents of the a
    14·1 answer
  • _______________ is a computer networking protocol used by hosts to retrieve IP address assignments.
    11·1 answer
  • The goal of this problem is to cover all roads with cameras. A camera placed at a station can cover all the roads connected to i
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!