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
sukhopar [10]
3 years ago
13

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

ional arguments. 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:
Reil [10]3 years ago
4 0

Answer:

YOU DONT HAVE A QUESTION ITS A LONG STATEMENT

Explanation:

Sloan [31]3 years ago
4 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)

                  

   except:

       print("Ran expected at most three arguments at most got", len(last)+1)

   

 

Explanation:

#section 1

The function is defined and a list is created to hold the range of values specified.

It is important to note that the function was created using one required argument and using by *args (*last), The function is allowed to accept extra positional arguments.

#section 2

In this section, we limit the extra positional arguments to two using a try and except block and raising a value error anytime a positional arguments more than three (remember we have 1 required argument) is entered.

The *args supply their arguments in a tuple.

Finally, within the try and except block depending on the arguments given; IF, ELIF and ELSE blocks are available to take those arguments and return the appropriate answer to generate the required range of values

You might be interested in
A security operation center (SOC) analyst investigates the propagation of a memory-resident virus across the network and notices
masya89 [10]

A type of virus that influences this circumstance in the network bandwidth is a worm.

<h3>What is Virus in technology?</h3>

In computers and technology, viruses may be characterized as a sort of malicious software, or malware, that extends between computers and provokes a deterioration of data and software either partially or completely.

The complete question is as follows:

  • A micro virus
  • a multipartite virus
  • A worm
  • a program virus.

Worms are memory-resident viruses that duplicate over the network resources. The primary consequence of this type of virus is to rapidly eradicate network bandwidth with its duplication.

This virus may also be competent to accomplish a Denial of services invasion by slamming O.S and servers.

Therefore, the correct option for this question is C, i.e. a worm.

To learn more about Computer viruses, refer to the link:

brainly.com/question/26128220

#SPJ1

5 0
2 years ago
If you use a surrogate key, you must ensure that the candidate key of the entity in question performs properly through the use o
Colt1911 [192]
Hello  <span>Abigailguzman6347</span><span>


</span>Answer: If you use a surrogate key, you must ensure that the candidate key of the entity in question performs properly through the use of "unique index" and "not null" constraints.

Hope This Helps!
-Chris
6 0
3 years ago
Why is it important to have a price assiociated in every product​
artcher [175]

Answer:

The wrong price can also negatively influence sales and cash flow. tbh there is no point to me  

Explanation:

7 0
2 years ago
Read 2 more answers
Which of these is not a way of avoiding email fraud and scams?
Sever21 [200]

Answer:

"If you aren't sure if a link is legitimate, click it to see where it goes."

Explanation:

If you click on a unknown URL the host of the website can steal a lot of information from you computer. Like your geolocation  

7 0
3 years ago
Which of the following is the correct order of laws (from local to state to federal)
professor190 [17]

Answer:

That, Federal law > Constitutional Law > State law > Local ordinances

Explanation:

4 0
3 years ago
Other questions:
  • Marisol manages the online advertising campaigns for a chain of toy stores with both a physical and an online presence. Which Go
    7·1 answer
  • Jason Has A Science Video Project, As He Creats His Project, He Saves, Then Comes Back A Minute Later. The File Is Now Unreadabl
    8·2 answers
  • A franchise restaurant is attempting to understand if customers think their service is good day-to-day by summarizing a series o
    10·1 answer
  • Donna often travels around the world. When she travels, she needs to access her emails from different locations. However, to kee
    6·2 answers
  • What are the two basic classes of active directory objects?
    14·1 answer
  • When you press the ____ key without entering any text after the automatic bullet character, Word turns off the automatic bullets
    11·1 answer
  • How can injection attacks be prevented? Check all that apply
    6·2 answers
  • A ___________ is a variable used to pass information to a method.
    11·2 answers
  • I need a solution for this problem asap.
    7·1 answer
  • True or false. windows server standard edition supports software-defined networking
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!