The python program will be:
def myRange(start, stop = None, step = None):
if(step == None and stop == None):
stop = start
start = 0
step = 1
elif(step == None):
step = 1
result = [] if (step < 0):
while stop < start:
result.append(start)
start += step else:
while start < stop:
result.append(start)
start += step return result def main():
print([x for x in myRange(10)])
print([x for x in myRange(1,10)])
print([x for x in myRange(1, 10,2)])
print([x for x in myRange(10, 1, -1)])
main()
What do you mean by python?
Python is a high-level and general-purpose programming language. Its design idea prioritises code readability through the use of extensive indentation. It is compatible with a variety of programming paradigms, including structured, object-oriented, and functional programming. Because of its extensive standard library, it is frequently referred to as a "batteries included" language. Guido van Rossum began developing Python as a replacement to the ABC programming language in the late 1980s, and it was originally released in 1991 as Python 0.9.0. Python 2.0, which was launched in 2000, added new features including such list comprehensions, cycle-detecting garbage collection, reference counting.
To learn more about python
brainly.com/question/26497128
#SPJ2
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.
For effective communication to occur, everyone must trust and respect each other. ... Clear and concise communication will allow your colleagues to understand and then trust you. As a result, there will be more cooperation and less conflict in the workplace.
Answer:
15
Explanation: