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
Fynjy0 [20]
3 years ago
11

Define and test a function myRange. This function should behave like Python’s standard range function, with the required and opt

ional arguments, but should return a list.
Do not use the range function in your implementation!

Hints:

Study Python’s help on range to determine the names, positions, and what to do with your function’s parameters.
Use a default value of None for the two optional parameters. If these parameters both equal None, then the function has been called with just the stop value. If just the third parameter equals None, then the function has been called with a start value as well. Thus, the first part of the function’s code establishes what the values of the parameters are or should be. The rest of the code uses those values to build a list by counting up or down.
Computers and Technology
2 answers:
Cerrena [4.2K]3 years ago
6 0

Answer:

Study Python’s help on range to determine the names, positions, and what to do with your function’s parameters.

Use a default value of None for the two optional parameters. If these parameters both equal None, then the function has been called with just the stop value. If just the third parameter equals None, then the function has been called with a start value as well. Thus, the first part of the function’s code establishes what the values of the parameters are or should be. The rest of the code uses those values to build a list by counting up or down.

Natasha_Volkova [10]3 years ago
3 0

Answer:

#section 1

def ran(first, *last):

  li = []

#section 2

  try:

      if len(last) > 2:

          raise ValueError

      

      elif len(last) == 1:

          while last[0] > first:

              li.append(first)

              first = first + 1

          print(li)

      

      elif len(last) == 2:

          while last[0] > first:

              li.append(first)

              first = first + last[1]

          print(li)

          

          

      else:

          i=0

          

          while i < first:

              li.append(i)

              i= i + 1

          print(li)

You might be interested in
Users can make notes or highlight areas of a website and then use the ________ feature of Microsoft Edge to send the highlighted
exis [7]

Answer:

Share.

Explanation:

Microsoft Edge is a web browser developed and hosted by Microsoft. It integrates cortana platform and other extensions, which are all hosted on Microsoft.

Just like every other browser, microsoft edge can interpret web codes values to its appropriate web page, it is simply used to browse the internet. When an area of the web page is highlight, copied or downloaded, it can be shared to other microsoft edge users through the share option.  

8 0
3 years ago
select all examples of proper keyboarding technique. rest your fingers gently on the home row or home keys. slouch in your chair
padilas [110]

Rest your fingers gently on the home row or home keys.

Rest your palms on the keyboard.

Relax your fingers.

All the above are proper keyboard techniques apart from slouch in your chair. It is always recommended to sit up straight with your feet positioned on the floor for balance. Do not cross. Center your body to the H key and have your elbows at sides and bent about 90 degrees. Use correct fingering and deploy touch typing. These and many others will help develop optimal speed and accuracy and help prevent the development of stress injury.

6 0
3 years ago
Read 2 more answers
Give me at least five main characteristic of irrigation equipment​
ss7ja [257]

Answer:

flow control devices

filters

fertigation equipment

water emitters

automation equipment

operation equipment

water-lifting devices.

3 0
3 years ago
Identify the modern-day printmaking process, also known as screenprinting, in which the artist squeegees paint through a mesh sc
aliya0001 [1]
Serigraphy is another word for this!
5 0
3 years ago
Write a public interface named Test with the following behavior:
enyata [817]

Answer:

The code to this question can be given as:

Code:

public interface Test  //define interface  

{

   public abstract Duration getDuration(); //define method

getDuration.  

   public abstract Result check(int a);

//define method

check .

   public abstract double getScore();

//define method getScore.  

}

Explanation:

In the above code, we define an interface that is "Test" inside an interface, we define three methods that can be defined as:

  • First, we define a method that is "getDuration" that method returns  Duration as an object.
  • Second, we define a method that is "check" this method accepts an integer parameter that is a and return Result.
  • The third method is "getScore" this method will return a double value.
8 0
3 years ago
Other questions:
  • Which osi layer is responsible for combining bits into bytes and bytes into frames?
    8·1 answer
  • Which of the following is the strongest password? Xo795&amp;A &amp;cGo9Tz F5h#3u9g vU7#$3T sC9$d&amp;cF5h#3u9g
    13·2 answers
  • You are adding new wires in your building for some new offices. The building has a false ceiling that holds the lights and provi
    8·1 answer
  • Trina Hauger works for Johnson Electric as a corporate lawyer, and part of her duties are to ensure the ethical and legal use of
    13·1 answer
  • On the Attendance worksheet, in cell L5, enter an IF function to determine if the percentage in cell K5 is greater than or equal
    9·1 answer
  • (01.03 LC)
    9·1 answer
  • What is the initial step to exploring solutions to a problem?
    15·2 answers
  • How to execute python code in command prompt *window*?
    5·1 answer
  • Between the div tags below, type the code for a link to the second.html page. Use "Go to the Second Page" as the link text
    11·1 answer
  • What are two reasons to tie cables up and out of the way inside a computer case?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!