Python Functions

Python Functions

2nd Grade - University

17 Qs

quiz-placeholder

Similar activities

Light and Sound Waves Review

Light and Sound Waves Review

3rd Grade

18 Qs

PLTW Design and Modeling Final Exam Review

PLTW Design and Modeling Final Exam Review

6th - 8th Grade

15 Qs

Cheiloscopy

Cheiloscopy

11th - 12th Grade

17 Qs

Conditionals

Conditionals

9th - 12th Grade

18 Qs

Fingerprint Classes

Fingerprint Classes

10th - 12th Grade

14 Qs

Minutiae

Minutiae

9th - 12th Grade

14 Qs

Fingerprint Pattern

Fingerprint Pattern

9th - 12th Grade

14 Qs

NYS ESRT Stream Velocity

NYS ESRT Stream Velocity

8th - 10th Grade

13 Qs

Python Functions

Python Functions

Assessment

Quiz

Other Sciences

2nd Grade - University

Medium

Created by

Charles Martinez

Used 3+ 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?