Docsity

Python Programming Exam Questions and Answers: Chapters 1-6, Exams of Advanced Education

Toggle sidebar
bg1
Python Programming - Chapters 1 to 6
Exam Questions & Answers
IDLE - ANSWERS-Python's Integrated DeveLopment Environment, a program
that lets you write code, test and debug, all in the one place.
Monty Python - ANSWERS-A British surreal comedy group after which Python
was named.
= - ANSWERS-assignment operator
<variable> = <expression> - ANSWERS-assignment statement
import <module> - ANSWERS-loads an existing Python module into the
current program
block - ANSWERS-one of more lines of code grouped together with the same
minimum amount of indentation
while <condition>: - ANSWERS-begins a pre-test loop
if <condition>: - ANSWERS-begins a binary selection statement
break - ANSWERS-tells the program to immediately jump out of a while-block
def <function name>: - ANSWERS-Indicates the beginning of a function
definition
pf3

Partial preview of the text

Download Python Programming Exam Questions and Answers: Chapters 1-6 and more Exams Advanced Education in PDF only on Docsity!

Python Programming - Chapters 1 to 6

Exam Questions & Answers

IDLE - ANSWERS-Python's Integrated DeveLopment Environment, a program that lets you write code, test and debug, all in the one place. Monty Python - ANSWERS-A British surreal comedy group after which Python was named. = - ANSWERS-assignment operator = - ANSWERS-assignment statement import - ANSWERS-loads an existing Python module into the current program block - ANSWERS-one of more lines of code grouped together with the same minimum amount of indentation while : - ANSWERS-begins a pre-test loop if : - ANSWERS-begins a binary selection statement break - ANSWERS-tells the program to immediately jump out of a while-block def : - ANSWERS-Indicates the beginning of a function definition

and - ANSWERS-The Boolean operator that only returns true if BOTH of its operands are true. or - ANSWERS-The Boolean operator that returns true if EITHER of its operands are true not - ANSWERS-The Boolean operator that returns true if its single operand is false return - ANSWERS-Specifies the value to be returned by a function back to its function call time.sleep(seconds) - ANSWERS-Instructs the program to pause for the specified number of seconds : - ANSWERS-A colon marks the end of a statement and indicates that the next line should be the beginning of a new block random.randint(low, high) - ANSWERS-returns a random integer between (and including) the two integers we give it int(string) - ANSWERS-converts the string argument to its integer form. str(number) - ANSWERS-converts a numeric argument to its string form. true - ANSWERS-the Boolean data value for yes/on/one false - ANSWERS-the Boolean data value for no/off/zero