Skip to main content

Computing Hinge-Point Question:

if password != 'FutureLearn2016' 
INDENT print('This is an invalid password; please try again: ')

elif password == ' ' 
INDENT print('You need to enter your password: ')

else 
INDENT print('Welcome back!')

What is wrong with this extract from a piece of Python coding?

A. There should be a space after the word print (italicised).

B. Blank lines should be removed.

C. A colon is needed after each if/elif/else line of code.

D. No variable has been used.

NOTES:

The intended context in which I would use it including the subject, level, topic and point in a particular course that I would envisage using it:

Answer: Computing; Key Stage 3; Programming; having just introduced 'selection' using 'if/elif/else' statements, and acting upon this before progressing onto 'iteration' using 'while' statements ans 'subroutines'

The evidence I would expect the hinge-point question to elicit:

Answer: Do the students appreciate the need for the use of a colon at the end of a 'if/elif/else' statement? 
At the same time it would indicate whether or not they were happy with: spacing conventions and identification of variables.

What I would do in response to the evidence, either with the whole class or with particular groups of students:

Answer: Depending on outcome, I would revisit, using a different strategy, 'if/elif/else' statements to the whole group/small group, with enrichment tasks for those who are confident.

Files

Subject(s)Computing, Design & Development
Age11-14
Comments0

Comments

Sign in to post comments