Python Quiz 7

Python Quiz 7

KG - 6th Grade

14 Qs

quiz-placeholder

Similar activities

Working with Text : Summary

Working with Text : Summary

6th Grade

10 Qs

Security and Ethics

Security and Ethics

9th - 12th Grade

17 Qs

Keyboard

Keyboard

2nd Grade

10 Qs

Trg@home 1

Trg@home 1

Professional Development

10 Qs

Coding Quiz

Coding Quiz

6th - 10th Grade

15 Qs

Quiz: Programming a Calculator. Part 1 and Part 2 Review

Quiz: Programming a Calculator. Part 1 and Part 2 Review

7th - 8th Grade

17 Qs

IT - TYPING TUTOR

IT - TYPING TUTOR

9th Grade

10 Qs

Class 1

Class 1

1st Grade

15 Qs

Python Quiz 7

Python Quiz 7

Assessment

Quiz

Computers

KG - 6th Grade

Practice Problem

Hard

Created by

Jerry Xiao

Used 7+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

14 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

True or False: In Python, there is no restriction on the name of a module file.

True

False

2.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

True or False: The randint function returns a randomly selected value from a specific sequence of numbers

True

False

3.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

A(n) _____ is a variable that receives an argument that is passed into a function

Argument

Parameter

Named Constant

Global Variable

4.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

What will be the output after the following code is executed?

def pass_it(x, y): ㅤㅤㅤㅤㅤ

z = x + “, “ + y ㅤㅤ

return(z) ㅤㅤㅤㅤ

name2 = “Tony” ㅤㅤㅤㅤㅤ

name1 = “Gaddis” ㅤㅤㅤㅤㅤ

ㅤㅤㅤfullname = pass_it(name1, name2)

print(fullname)ㅤㅤㅤㅤㅤㅤㅤ

Gaddis, Tony

Gaddis Tony

Tony Gaddis

Tony, Gaddis

5.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

What will be displayed after the following code is executed?:

def pass_it(x, y): ㅤㅤㅤㅤㅤㅤㅤㅤ

z = x*y ㅤㅤㅤㅤㅤㅤㅤㅤ

result = get_result(z) ㅤㅤㅤ

return(result) ㅤㅤㅤㅤㅤㅤ

def get_result(result): ㅤㅤㅤㅤㅤㅤㅤ

z = result + 2 ㅤㅤㅤㅤㅤㅤ

return(z) ㅤㅤㅤㅤㅤㅤㅤㅤ

num1 = 3 ㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤ

num2 = 4 ㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤ

answer = pass_it(num1, num2) ㅤㅤㅤ

print(answer)ㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤ

9

14

12

Syntax Error

6.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

What are the benefits of creating a function?

Simpler Code

Code Reuse

Better Testing and Debugging

Faster Development and Easier for TeamWork

All of the Above

7.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

True or False: The below functions are the same.

max()

Max()

True

False

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?