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 | |
|---|---|---|
| 1studentFirstName | Adef getHighScore(): | |
| 2calculateTotal() | BThe name starts with a capital S. Camel case must start with a lower case letter, so it should be studentFirstName. | |
| 3Camel case variable name made from the words 'final mark' | CA variable name in camel case: no spaces, starts lower case, and each later word starts with a capital | |
| 4Camel case function name made from the words 'get high score' | DA function name in camel case: the first word is lower case and the next word is capitalised | |
| 5StudentFirstName = "Ava" | EfinalMark = 85 | |
| 6def calculate_total(): | FThe name uses an underscore (snake case) instead of capitalising the second word. In camel case it should be calculateTotal. |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
studentFirstName — Camel casing: join words with no spaces, start with a lower case letter, then capitalise the first letter of each later word, e.g. studentFirstName or calculateTotal.studentFirstName = "Ava"def calculateTotal(price, qty):
return price * qtyfirstName = "Liam"
lastName = "Smith"
fullName = firstName + " " + lastNamefor studentName in names:
print(studentName)def getAverageMark(m1, m2):
return (m1 + m2) / 2
avgMark = getAverageMark(80, 90)