Python: Functions and Parameters

Quiz
•
Computers
•
9th - 12th Grade
•
Medium
Karen Koelm
Used 112+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Which of the following is the correct code to define a function?
def area ( ):
area ( )
def area:
def area ( )
2.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Which of the following is the correct way to call a function?
def distance ( ):
distance
distance ( )
distance ( ):
3.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
In the provided code, which variables have not been defined?
dist
d
rate
time
4.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
In the provided code, which values are parameters?
rate
5
time
8
d
5.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
In the provided code, which values are arguments?
rate
time
5
8
d
6.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
What are the valid data types for the parameters/arguments of the pre-built function, math.sprt ( ) ?
integer
float
boolean
string
7.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What is the correct data type for the value of cat?
cat = input("How many cats do you have?")
string
integer
float
boolean
Create a free account and access millions of resources
Similar Resources on Wayground
10 questions
3.2.2 Mouse Press Events and onAppStart Function

Quiz
•
11th Grade
10 questions
Using Subroutines in Python

Quiz
•
12th Grade
15 questions
Functions in Python

Quiz
•
9th - 12th Grade
13 questions
2.5 Translators & Facilities - OCR GCSE Computer Science

Quiz
•
7th - 12th Grade
10 questions
Arrays

Quiz
•
10th - 12th Grade
10 questions
Advanced Python Iteration Quiz

Quiz
•
10th Grade
14 questions
Python Objects and Recursion

Quiz
•
10th Grade
11 questions
python basics

Quiz
•
9th - 12th Grade
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
US Constitution Quiz

Quiz
•
11th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
20 questions
Analog vs Digital

Quiz
•
9th - 12th Grade
10 questions
CTEA Computer Vocab Terms #1

Quiz
•
12th Grade
10 questions
Exploring Cybersecurity Techniques and Threats

Interactive video
•
6th - 10th Grade
10 questions
Understanding the Internet and Data Transmission

Interactive video
•
7th - 12th Grade