Verifying, The answer above me is correct
Answer:
def printRange(start, stop, steps = 1):
list1 = []
if steps > start or stop:
print("Steps is larger than start and stop value")
return None
if int(start) < int(stop):
while start < stop:
start = start + int(steps)
list1.append(start)
print(list1)
elif start > stop:
while start > stop:
stop = stop + int(steps)
list1.append(stop)
print(list1)
elif start == stop:
print(start)
else:
print("Values are not integers.")
for easier viewing:
https://www.codepile.net/pile/e95verLk
If you need help understanding comment below.
The execution speed of machine language is faster than the execution speed of other languages. Machine or assembly language will execute the fastest as compared to high-level languages. No other language can execute faster than Machine language since instructions are directed straight to the CPU. Other high-level languages often add some non-zero amount of overhead to the execution time, thus, causing some delay.
Evaluation-the making of a judgment about the amount, number, or value of something; assessment
Domain Name-Is a websites name (ex-Google)
Authoritativeness-The quality of possessing authority. The quality of trustworthiness and reliability.
Accuracy-the quality or state of being correct or precise
Timeliness-the fact or quality of being done or occurring at a favorable or useful time.
Objectivity-the quality of being objective.
Writing Style and Mechanics-Style has to do with how a piece of writing sounds. Everyone has a style which develops along with their writing.
Paragraph structure: Each paragraph should begin with a topic sentence that provides an overall understanding of the paragraph. ...
Sentence length: Sentences should be kept as short as possible so that their structure is simple and readable.
Graphics-are visual images or designs
Links- is an open source text and graphic web browser with a pull-down menu system.
False.
The different between break and continue instruction is that with break you exit the loop, and with continue you skip to the next iteration.
So, for example, a loop like
for(i = 1; i <= 10; i++){
if(i <= 5){
print(i);
} else {
break;
}
}
will print 1,2,3,4,5, because when i=6 you will enter the else branch and you will exit the loop because of the break instruction.
On the other hand, a loop like
for(i = 1; i <= 10; i++){
if(i % 2 == 0){
print(i);
} else {
continue;
}
}
Will print 2,4,6,8,10, because if i is even you print it, and if i is odd you will simply skip to the next iteration.