Quiz Topic 5 - Functions

Ace your homework & exams now with Quizwiz!

Which is NOT the possible output of random.randrange(100, 1000, 2)? 938 664 764 251

251

How many function calls are there in the following statement? print('You were born in ', (2019 - int(input('How old are you? ')))) 1 2 3 4

3

What is the result of the following statement? x = random.randint(5, 15) ** 2 A random integer from 5 to 15, squared, assigned to the variable x A random integer from 5 to 15, selected in 2 steps, assigned to the variable x A random integer from 5 to 15 assigned to the variable x A random integer from 5 to 15, multiplied by 2, assigned to the variable x

A random integer from 5 to 15, squared, assigned to the variable x

Select which function is not fond in math module. ceil log circlearea sqrt

circlearea

One of the benefits of functions is _____________ which eliminates the need to copy-paste the same code over and over again. flowchart visibility reduced run time code resuse

code resuse

Which of the following functions returns the largest integer that is less than or equal to x? greater floor ceil lesser

floor

The first line in the function definition is known as the function ________. parameter block return header

header

A ________ variable is created inside a function. local defined global constant

local

The Python standard library's ________ module contains numerous functions that can be used in mathematical calculations. string random math number

math

A function can have one or more special variables which receive data when the function is called. Such variables are named as __________ parameters global variables input variables flags

parameters


Related study sets

Chapter 7- Accounting for Cash Study Plan

View Set

Chapter 22: The Child with Gastrointestinal Dysfunction ANS

View Set

Gateways to Art Chapter 1.8 & 1.9

View Set

ELA 10 - "By the Waters of Babylon," Pt2: Analyzing Theme (Pre-test)

View Set