Font size
WorksheetsPython syntax quiz
Total questions: 15
Worksheet time: 17mins
Syntax is ..
Rules for programming language
Type of loops
Condition
Logical operator
Output of Print("Hello world") appears in
stage
console
workspace
all of these
to create a new function what is the first word you should type?
fun
func
def
function
function called add how i can define it in python
add()
add def()
def add():
def add
how many types of loops in python
(a)
there is a colon ( : ) in 4 things in python what are these thing
for
function
if
while
syntax
num = 5
def fun():
num = 6
fun()
print(num)
5
6
11
1
num = 5
def fun():
global num
num = 6
fun()
print(num)
5
6
11
1
num = 5
def fun():
global num
num = 6
print(num)
5
6
11
1
(5<6) and (3<4)
false
true
(5<6) or(3>4)
false
true
correct syntax for (for loop ) is
for i range(3)
for i in range 3
for in range(3):
for i in range(3):
x = 5
if x > 6 :
print("Hello")
else:
print("Hi")
Hi
Hello
x = 5
y = 6
if x > y or y == 6:
print("Hi")
else:
print("Hello")
Hi
Hello
l = [2, 6, 5 , 3] what is the index of number 6
0
1
2
3
