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
Trava [24]
4 years ago
14

The function below takes two integer parameters: low and high. Complete the function so that it prints the numbers from low to h

igh in order, including both low and high, each on a separate line. The recommended approach for this question is to use a for loop over a range statement.
1 def print_range(low, high):

2 # Implement your function here. Be sure to indent your code block!

Computers and Technology
1 answer:
NikAS [45]4 years ago
5 0

Answer:

def print_range(low, high):

 for i in range(low,high):

   print(i)

Explanation:

Create the function to accept two parameters (low and high)

Use a for loop to iterate from low to high using the range function

Print the value at each iteration

See a complete program and output below.

<em>def print_range(low, high): </em>

<em>  for i in range(low,high):</em>

<em>    print(i)</em>

<em>low = 1</em>

<em>high =10</em>

<em>print_range(low, (high+1)) </em>

<em />

You might be interested in
Which of the following code segments does not contain any errors?
Readme [11.4K]

Answer:

c. double triple(float n) { return (3 * n); }

Explanation:

In option a print is used to print integer.While printf is used in C to print something.

In option b there is no * operator between s s s it should be s*s*s.So it will give error.

In option d there is also no multiply operator * in between 3.14 2 r it should be 3.14*2*r.

So we can say that option c is error free.

8 0
3 years ago
Can anybody tell me why when I use my camera to scan the question is not working?
sleet_krkn [62]

Answer:

Have you tried reseting or updating your device?

Explanation:

5 0
3 years ago
Helpppppp please I will give branliest or something please help ​
Allisa [31]

OK you don't be sad it is always free

7 0
3 years ago
Write a code segment that prints the food item associated with selection. For example, if selection is 3, the code segment shoul
Ganezh [65]

<em>Missing Part:</em>

<em>Assume that the following variables have been properly declared and initialized: an int variable named selection, where 1 represents "beef", 2 represents "chicken", 3 represents "pasta", and all other values represent "fish"</em>

Answer:

if selection == 1:

    print("beef")

elif selection == 2:

    print("chicken")

elif selection ==3:

    print("pasta")

else:

    print("fish")

Explanation:

I've completer the question and the questin will be answered in python.

   

This checks if selection is 1. If yes, it prints the beef

<em>if selection == 1:</em>

<em>     print("beef")</em>

This checks if selection is 2. If yes, it prints the chicken

<em>elif selection == 2:</em>

<em>     print("chicken")</em>

This checks if selection is 3. If yes, it prints the pasta

elif selection ==3:

    print("pasta")

Any other input is considered java/

else:

    print("fish")

4 0
3 years ago
If you fail a course as a MAIN (residency) course, you can repeat that course as either a MAIN (residency) or an online (IG or I
Elina [12.6K]

Answer: False

Explanation:

The statement that "you fail a course as a MAIN (residency) course, you can repeat that course as either a MAIN (residency) or an online (IG or IIG) course" is false.

It should be noted that if one fail a course as a residency course, the course can only be repeated as a main (residency) course and not an online course. When a course is failed, such course has to be repeated the following semester and this will give the person the chance to improve their GPA.

5 0
3 years ago
Other questions:
  • The network board in a workstation is currently configured as follows:- network speed = auto- duplexing = autoThe workstation is
    13·2 answers
  • Create a procedure named FindLargest that receives two parameters: a pointer to a signed doubleword array, and a count of the ar
    13·1 answer
  • What piece of software tells the operating system how to use a specific hardware device?
    14·1 answer
  • Why is it a good idea to save work in the cloud
    10·2 answers
  • A display that is thin, flexible, light, and easy to read in all types of light is
    9·2 answers
  • A _____ is often used in Access to present a menu with command buttons that end users can click to perform various database acti
    13·1 answer
  • A new employee has reported that print jobs are printing as garbled text. Which of the following is MOST likely the reason for t
    8·1 answer
  • Given the following code, what are the dimensions, in pixels, of the shape created? import tkinter class myShape: def __init__(s
    6·1 answer
  • What is the term for a set of actions carried out on inputs?
    7·1 answer
  • do you think that some people have difficulty talking to others face to face because of how prevalent texting is today
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!