Computer Science, asked by sabnamzoya2, 7 months ago

What is the output of the following code? 

for i in range(5):    if i == 5:        break    else:        print(i)else:    print("Here")​

Answers

Answered by patelvruti2017
2

Answer:

0 1 2 3 4

Explanation:

The else part is executed if control doesn’t break out of the loop.

Answered by 27swatikumari
0

Answer: 0 1 2 3 4 If the loop's control doesn't break, the else portion is carried out.

Explanation: When i = 0, show(i)i += 1ifi == none of the listed 3:breakelse:print(0)a) 0 1 2 0b) 0 1 2c) mistake View Response Response: b Explained: If control leaves the loop, the else portion is not carried out. Name Error, i not defined, explanation. The range function can be iterated inside of with the aid of the Python for i command. where the temporary variable "i" holds the numeric number of the current location within the for loop's range. with two justifications for i in the -1 to 5 range: print(i, end=", "), ") -1, 0, 1, 2, 3, 4, # stamps. The increase between the numbers in the range is controlled by the optional step value. Step is always set to 1. We use the range of integers from -1 to in our concluding illustration.

Every number's exponent indicates how many times it should be multiplied. Therefore, 510 can be used to represent 5 to the degree of 10. Where 1 is the expression's power or exponent and 5 is referred to as the base. The result is 9765625, or 5 to the power of 10.

Learn more about Python from here;

https://brainly.in/question/7697308

https://brainly.in/question/29193878

#SPJ6

Similar questions