Quiz
Python: Computing Test
This quiz has a time limit, so it opens in the usual player.
Questions in this quiz (15)
1Label the image to identify these basic components of Python.

- AIf statement
- BElif Statement
- CInput
- DOutput
- EVariable
- FConstant
- GString
- HValue
- IInteger
- JAnswer
- KFunction
- LRequest
- MTask
2A Boolean can only have values true or false. True or false? See what I did with the image...

- ATrue
- BFalse
3Which of these are data types?
- AIntegers
- BDecimals
- CStrings
- DBooleans
- EText
- FWords
- GNumbers
- HFloat
- IStraight
- JLift
4A variable's name can have spaces in it?
- ATrue
- BFalse
5A [blank_start]while[blank_end] loop is a loop which stays [blank_start]active[blank_end] while a certain [blank_start]condition[blank_end] is met. As soon as the condition is not met it will carry on with the code.
- Awhile
- Bwhen
- Chow
- Dactive
- Eoff
- Finactive
- Gcondition
- Hchallenge
- Itask
6Data types.
A [blank_start]string[blank_end] is a piece of text.
A float is any [blank_start]decimal[blank_end] number.
An integer is any [blank_start]whole[blank_end] number.
A [blank_start]boolean[blank_end] is a true or [blank_start]false[blank_end] statement.
[blank_start]Casting[blank_end] is the technical term for assigning a new value to a [blank_start]variable[blank_end] and changing it's data type.- Astring
- Bdecimal
- Cwhole
- Dboolean
- Efalse
- FCasting
- Gvariable
7If statements.
An [blank_start]if[blank_end] statement has two conditions, one is used if a [blank_start]condition[blank_end] is met and the other is used for when the condition is not [blank_start]met[blank_end].
An example would be if you have glasses stand up else sit down.
To write this in python:
if has_sister =[blank_start]=[blank_end] true[blank_start]:[blank_end]
left_arm = "up"
[blank_start]else[blank_end]:
right_arm "up[blank_start]"[blank_end]
You have to remember the syn[blank_start]tax[blank_end] when writing code in Python.
Notice that the variables were [blank_start]booleans[blank_end] and not any other data type.- Aif
- Bcondition
- Cmet
- D=
- E:
- Felse
- G"
- Htax
- Ibooleans
8When writing if statements, you should always use [blank_start]indentation[blank_end] after a certain condition so that the program knows that it is part of the if statement. You press the [blank_start]tab[blank_end] key to do this.
Another thing to remember is the [blank_start]Colons[blank_end] just after you write your statement.
If you write an if statement correctly the indentation will be done for you.- Aindentation
- Bgaps
- Cspaces
- Dtab
- Espacebar
- Fenter
- GColons
- HSemi colons
- Icommas
- Jhashtags
9Fix these errors:
primt ("Hello World!")
Print ("Hello World!")
print (Hello World!)
print "Hello World!"
Correct here:
[blank_start]primt ("Hello World!")[blank_end]
[blank_start]Print ("Hello World!")[blank_end]
[blank_start]print (Hello World!)[blank_end]
[blank_start]print "Hello World!"[blank_end]- Aprint ("Hello World!")
- Bprint ("Hello World!")
- Cprint ("Hello World!")
- Dprint ("Hello World!")
10A [blank_start]variable[blank_end] name can contain only [blank_start]numbers, letters and underscores[blank_end]
A variable name cannot start with a [blank_start]number[blank_end]
You can’t use a Python [blank_start]“reserved word”[blank_end] as a variable name – for example [blank_start]class[blank_end] is a reserved word so class = input[blank_start]()[blank_end] will result in a [blank_start]syntax[blank_end] error- Avariable
- Binput
- Cnumbers, letters and underscores
- Dletters and numbers
- Eletters and underscores
- Fletters
- Gnumber
- Hletter
- Iunderscore
- J"reserved word"
- K"special word"
- L"secret word"
- Mclass
- Nteacher
- Ostudent
- P()
- Q""
- R::
- S==
- Tsyntax
- Udata
- Vlogic
11To write comments you must have what symbol in front of it?
- A#
- B@
- C~
- D/
12Print, input and round are three examples of what?
- AFunctions
- BCommands
- CTasks
13Fill in the blanks to complete this table.
[blank_start]==[blank_end] equal to
!= [blank_start]not equal to[blank_end]
> [blank_start]Greater than[blank_end]
[blank_start]<[blank_end] Less than
[blank_start]>=[blank_end] Greater than or equal to
<= [blank_start]Less than or equal to[blank_end]- A==
- Bnot equal to
- CGreater than
- D<
- E>=
- FLess than or equal to
14Which of these are types of errors?
- ASyntax error
- BLogic error
- CRun time error
- DData error
- ECoding error
- FValue error
- GVariable error
15Name the function:
It outputs any text that you enter.
The Answer is: [[blank_start]Print[blank_end]]- APrint
Information
- Description
- GCSE Computing Quiz on Python: Computing Test, created by Computing ODA on 27/09/2017.
- Author
- Computing ODA
- Language
- English
- Views
- 1
- Tags
- Rating
- No ratings yet Rate this quiz