Python procedures and functions

Quiz
•
Computers
•
8th - 10th Grade
•
Hard
Henry Sanderson
Used 31+ 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
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
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
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
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
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
Similar Resources on Wayground
30 questions
Python Beginner

Quiz
•
6th - 12th Grade
30 questions
Algorithms, Flowcharts, Scratch & Python

Quiz
•
10th Grade
30 questions
Python Quiz 2

Quiz
•
10th Grade
30 questions
Python Basics: Variables and Syntax

Quiz
•
10th Grade
31 questions
Python Course Selection

Quiz
•
7th - 11th Grade
30 questions
Python Programming End of Unit Assessment

Quiz
•
7th - 9th Grade
31 questions
Python - Variables

Quiz
•
6th - 8th Grade
40 questions
YEAR 8 END OF YEAR ASSESSMENT 2022

Quiz
•
8th Grade
Popular Resources on Wayground
50 questions
Trivia 7/25

Quiz
•
12th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
11 questions
Negative Exponents

Quiz
•
7th - 8th Grade
12 questions
Exponent Expressions

Quiz
•
6th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
20 questions
One Step Equations All Operations

Quiz
•
6th - 7th Grade
18 questions
"A Quilt of a Country"

Quiz
•
9th Grade
Discover more resources for Computers
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
11 questions
Negative Exponents

Quiz
•
7th - 8th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
18 questions
"A Quilt of a Country"

Quiz
•
9th Grade
6 questions
RL.10.1 Cite Evidence

Quiz
•
10th Grade
10 questions
Characteristics of Life

Quiz
•
9th - 10th Grade
14 questions
Algebra 1 SOL Review #1

Quiz
•
9th Grade