Python function quiz

Python function quiz

2nd Grade - University

17 Qs

quiz-placeholder

Similar activities

Test on Python Function

Test on Python Function

11th - 12th Grade

12 Qs

Python syntax quiz

Python syntax quiz

1st - 4th Grade

15 Qs

Python

Python

6th - 10th Grade

17 Qs

ASK F2 -KOD ARAHAN (PYTHON)

ASK F2 -KOD ARAHAN (PYTHON)

1st Grade - University

15 Qs

python quiz

python quiz

12th Grade

20 Qs

Python Strings

Python Strings

University

20 Qs

Computer Science (Python)

Computer Science (Python)

9th Grade

18 Qs

Hangman Game - Programming Questions

Hangman Game - Programming Questions

7th - 11th Grade

15 Qs

Python function quiz

Python function quiz

Assessment

Quiz

Other Sciences, Computers

2nd Grade - University

Medium

Created by

Martin Highmore

Used 377+ times

FREE Resource

17 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the output
def greeting(name):
      print ('hello ' + name)
print (greeting('Daddy'))
answer
name
Daddy 
hello Daddy
hello name

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the output
def adder(x, y):
      print x + y
print (adder(1, 2))
answer
y + x
x + y
3
4

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the output
def adder(x, y):
      print x + y
print (adder("1","2"))
answer
y + x
12
3
4

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the output
x = 67
if x != 67:
     print "x is not equal to 67"
else:
      print 'x is equal to 67'
answer
x is not equal to 67
x is equal to 67
print "x is equal to 67"
print 'x is not equal to 67'

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the output
def hello():
     print ('hello')
def start():
     print("start")
start()
   
l = lambda x: 'hello'
l = lambda x: hello
hello
start

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the output?
x = "This is a string"
def hello():
     x = "hello"
     print x
print hello()

x in hello and x out side hello

hello
"hello" and "This is a string"
"This is a string" and "Hello"
hello and this This is a string

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the output
x = 'asa '
print x*3
answer

asa asa asa 3
3 asa asa asa 
None of the above
asa asa asa

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?