Python Coding Flashcards Preview

Year 9 Computer Science Revision 2023 > Python Coding > Flashcards

Flashcards in Python Coding Deck (9)
Loading flashcards...
1
Q

Is Python an operating system?

A

No - it is a high level programming language

2
Q

Define a variable

A

Variables are containers for storing data values

3
Q

What is missing from this line of code?

print (“hello)

A

A “ is missing

4
Q

An If statement is an example of…

A

Selection

5
Q

A while loop is an example of…

A

Iteration

6
Q

A print statement is an example of…

A

Sequence

7
Q

What does this line of Python code do?

this line creates a new variable

A

Not run as it is just a comment

8
Q

Why is this a syntax error?
if mark >10:
print (“well done”)

A

Line 2 is not indented

9
Q

What is a syntax error?

A

When there is a spelling mistake or code is missing