Python: Functions and Parameters

Quiz
•
Computers
•
9th - 12th Grade
•
Medium
Karen Koelm
Used 111+ 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
14 questions
Python Data types & Exceptions

Quiz
•
1st - 10th Grade
11 questions
Python Boolean

Quiz
•
11th - 12th Grade
14 questions
Python Syntax

Quiz
•
6th - 12th Grade
15 questions
Python revision

Quiz
•
10th Grade - University
10 questions
J277 - 2.2 - Functions in Python

Quiz
•
10th Grade - University
15 questions
Subroutine

Quiz
•
10th Grade
12 questions
Python Definitions

Quiz
•
10th - 12th Grade
15 questions
Programming - Screening Test

Quiz
•
3rd Grade - Professio...
Popular Resources on Wayground
18 questions
Writing Launch Day 1

Lesson
•
3rd Grade
11 questions
Hallway & Bathroom Expectations

Quiz
•
6th - 8th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
40 questions
Algebra Review Topics

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

Quiz
•
8th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
19 questions
Handbook Overview

Lesson
•
9th - 12th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
Discover more resources for Computers
40 questions
Algebra Review Topics

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

Interactive video
•
6th - 10th Grade
19 questions
Handbook Overview

Lesson
•
9th - 12th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
40 questions
LSHS Student Handbook Review: Pages 7-9

Quiz
•
11th Grade
24 questions
Scientific method and variables review

Quiz
•
9th Grade
10 questions
Characteristics of Life

Quiz
•
9th - 10th Grade
19 questions
Mental Health Vocabulary Pre-test

Quiz
•
9th Grade