0
Plz Explain the output of this code
for n in range(1,7) print(7//n, end="")
2 Answers
+ 2
range(1, 7) starts with 1 and ends with 6
7 // 1 => 7
7 // 2 => 3
7 // 3 => 2
7 // 4 => 1
7 // 5 => 1
7 // 6 => 1
+ 7
The output of that code would be an error because you need a colon at the end of the first line and need to indent the second line. Then following up on what Ipang said, the output would be 732111 because the end character has been changed from the default "\n" to "".