Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.
Shade in the A or B circle for each question.
Draw a line connecting each item on the left to its match on the right.
| Left column | Right column | |
|---|---|---|
| 1student_first_name = "Ava" | AHyphens cannot be used in Python names. Words must be joined with underscores, so it should be get_average_mark. | |
| 2MAX_ATTEMPTS = 3 | BA constant named in UPPER_SNAKE_CASE: all capitals with underscores between words | |
| 3Python functions are named in snake case, with lower case words joined by underscores | CA Python variable named in snake case: all lower case with underscores between words | |
| 4Converting the camel case name studentFirstName to snake case | DSnake case variable names must be all lower case. Capital letters should not be used, so it should be student_first_name. | |
| 5Student_First_Name = "Liam" | Estudent_first_name | |
| 6def get-average-mark(marks): | Fdef calculate_total_price(items): |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
snake_case — A naming convention that writes every letter in lower case and joins words with underscores, e.g. student_first_name. Python uses it for variables and functions.total_marks = 85first_name = "Ava"
print(first_name)def get_total(a, b):
return a + b
print(get_total(2, 3))MAX_SCORE = 100
score = 120
print(score > MAX_SCORE)# camelCase: studentAge
student_age = 17