Python procedures and functions

Python procedures and functions

8th - 10th Grade

35 Qs

quiz-placeholder

Similar activities

Python

Python

8th - 12th Grade

40 Qs

Year 8 CAT

Year 8 CAT

8th Grade

40 Qs

Python Exam

Python Exam

6th - 8th Grade

30 Qs

ทดสอบภาษาไพทอนเบื้องต้น

ทดสอบภาษาไพทอนเบื้องต้น

10th - 12th Grade

30 Qs

2.2 j277 computer science programming techniques (iteration)

2.2 j277 computer science programming techniques (iteration)

9th - 10th Grade

30 Qs

Intro to CS (Python Fundamentals) S1 Exam

Intro to CS (Python Fundamentals) S1 Exam

9th - 12th Grade

30 Qs

Python Basics

Python Basics

8th Grade

31 Qs

Python Test

Python Test

8th - 12th Grade

40 Qs

Python procedures and functions

Python procedures and functions

Assessment

Quiz

Computers

8th - 10th Grade

Hard

Created by

Henry Sanderson

Used 30+ times

FREE Resource

35 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Leo wants to create a subroutine that will roll a dice. Which syntax is correct?

def dice roll ():

def diceroll ()

def diceroll ():

def diceroll []:

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What would the output be from the program shown here? (assuming that the user enters "John" and "Smith"

John

Smith

John Smith

Error

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What would the output be from this program?

Error

Hello

Hello, World

World

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the difference between a procedure and a function?

They are the same thing

A procedure passes values back out to the program, a function does not

A function passes values back out to the program, a procedure does not

A function can run without being called

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What will the output of this program be when it is run?

Nothing

Hello, world

It will generate an error

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What will be the output of this program if the user enters "Han" and then "Solo"?

An error

Nothing

first surname

Han Solo

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What would the output be for the following program if the user enters 4 and 6?

10

14

16

error

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?