Martin Covill
Quiz by , created more than 1 year ago

keywords used to program in Python

42
2
0
Fiona Faulkner
Created by Fiona Faulkner about 9 years ago
Martin Covill
Copied by Martin Covill about 9 years ago
Close

Python revision quiz

Question 1 of 9

1

The keyword 'print' outputs text in brackets to the screen

Select one of the following:

  • True
  • False

Explanation

Question 2 of 9

1

To store data in a program we use a variable followed by this sign

Select one or more of the following:

  • colon (:)

  • equals (=)

  • hyphen (-)

Explanation

Question 3 of 9

1

To allow the user of a program to enter data in response to a question we use the keyword 'int'

Select one of the following:

  • True
  • False

Explanation

Question 4 of 9

1

Data that consists of letters, characters, spaces and numbers is this data type:

Select one of the following:

  • string

  • integer

  • float

Explanation

Question 5 of 9

1

To cast a number back to string we use int( )

Select one of the following:

  • True
  • False

Explanation

Question 6 of 9

1

To tell a program to only run if a specified condition is met, we use:

Select one or more of the following:

  • else

  • elif

  • if

Explanation

Question 7 of 9

1

Iteration means:

Select one of the following:

  • the program will end

  • the program will loop

Explanation

Question 8 of 9

1

To make a program easier to read and understand we use a line of text to explain part of the code. So that the line of text does not become confused as part of the actual program, we use this character:

Select one or more of the following:

  • #

  • *

Explanation

Question 9 of 9

1

Boolean conditions can only have 1 of 2 possible values, e.g. ==, !=

Select one of the following:

  • True
  • False

Explanation