Python Basics – Functions, Conditionals
This flashcard set covers foundational Python programming concepts including functions, parameters, conditional statements (if, else, comparisons), Boolean logic (and, or, not), and syntax correction. Ideal for beginners, it helps reinforce the logic and structure needed to write and debug simple Python programs.
3.1 Lesson Practice
A ____________ is a set of commands which can be run by calling it by name.
function
Key Terms
3.1 Lesson Practice
A ____________ is a set of commands which can be run by calling it by name.
function
3.1 Lesson Practice
A _____________ is a piece of information sent to a function.
parameter
3.1 Lesson Practice
Consider the following code:
x = random.randint (1, 100)
The randint is a ____________.
function
3.1 Lesson Practice
Which of the following is NOT a function?
math
3.2 Lesson Practice
For questions 1-3, consider the following code:
What is output if the user types in 9? Click all that apply.
C
D
A
3.2 Lesson Practice
What is output if the user types in 8? Click all that apply
C
Related Flashcard Decks
Study Tips
- Press F to enter focus mode for distraction-free studying
 - Review cards regularly to improve retention
 - Try to recall the answer before flipping the card
 - Share this deck with friends to study together
 
| Term | Definition | 
|---|---|
3.1 Lesson Practice  | function  | 
3.1 Lesson Practice  | parameter  | 
3.1 Lesson Practice  | function  | 
3.1 Lesson Practice  | math  | 
3.2 Lesson Practice  | C  | 
3.2 Lesson Practice  | C  | 
3.2 Lesson Practice  | A  | 
3.2 Code Practice: Question 1  | n = float(input("Enter a number: "))  | 
3.2 Code Practice: Question 2  | a = float(input('Enter a number: ')) i  | 
3.2 Code Practice: Question 3  | password = input("Enter the password:")  | 
3.3 Lesson Practice  | The print (OK) should be print ("OK")  | 
3.3 Lesson Practice  | not  | 
3.3 Lesson Practice  | if (x >= -10 and x <= 10):  | 
3.3 Code Practice: Question 1  | day = int(input("Enter today's day numerically: "))  | 
3.3 Code Practice: Question 2  | r = int(input("Enter the red: "))  | 
3.4 Lesson Practice  | ONE  | 
3.4 Lesson Practice  | First half of the month  | 
3.4 Lesson Practice  | Not in September  | 
3.4 Lesson Practice  | Second half of the month  | 
3.4 Code Practice: Question 1  | color = input("What color? ")  | 
3.4 Code Practice: Question 2  | num = int(input("Numerator: "))  | 
3.5 Lesson Practice  | A  | 
3.5 Lesson Practice  | B  | 
3.5 Lesson Practice  | C  | 
3.5 Lesson Practice  | E  | 
3.5 Lesson Practice  | There is an error, the else should be after the elif  | 
3.5 Lesson Practice  | 3  | 
3.5 Code Practice  | grade = int(input("What grade are you in? "))  | 
3.5 Lesson Practice  | There is an error, the else should be after the elif  | 
3.5 Lesson Practice  | 3  | 
3.5 Code Practice  | grade = int(input("What grade are you in? "))  |