Write a program code to print numbers from 1 to 10 ?
for i in range (10):print i
for i in range (0, 10):print i
for i in range (1, 11):print i
for i in range (1,10):print i
The following program code will results:for i in range(10, 1, -2);print i
10 8 6 4 2
10 8 6 4 2 1
10 8 6 4 2 0
-10 -8 -6 -4 -2
What is Turtle?
Circle
An arrow mark
Dot
Square
Which of following is an iteration instruction?
for
if
rt ()
range
Which of the following is the text editor, commonly used for coding HTML or Python?
Gedit
PhET
IDLE
BSD
IDLE stands for
Integrated Development Environment
Integrated Development Entity
Integrated Development Education
Integrated Development Employment
Find the output of the code snippet?for i in range (5, 0, -1):print i
1 2 3 4 5
-1 -2 -3 -4 -5
5 4 3 2 1
5 4 3 2 1 0
___________ function will clear/ delete the previous result/ output of the program.
cls()
clrscr()
clear()
clear
Program to find the product of all the numbers from 1 to 5:
p= 1for i in range(1, 6):p= p× iprint p
p= 0for i in range(1, 5):p= p× iprint i
For i in range(0, 6):p= p× iprint p
p= 1for i in range(1, 5):p = p× iprint p