0% found this document useful (0 votes)
81 views

Python ICT Test

This document contains a quiz about Python fundamentals. It covers basic Python concepts like variables, data types, operators, conditionals, and functions. The quiz has 20 multiple choice questions testing understanding of these core Python ideas.

Uploaded by

Victor
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
81 views

Python ICT Test

This document contains a quiz about Python fundamentals. It covers basic Python concepts like variables, data types, operators, conditionals, and functions. The quiz has 20 multiple choice questions testing understanding of these core Python ideas.

Uploaded by

Victor
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

Python

Worksheets Name

Python - Quiz Class


Total questions: 17
Worksheet time: 11mins Date

1. Stores a piece of data, and gives it a specific name

a) interpreter b) variable
c) whitespace d) modulus

2. Returns the remainder from division

a) modulus b) boolean
c) variables d) exponents

3. Surrounds multi-line comments

a) % b) """
c) # d) **

4. A line of text that Python won't try to run as code

a) modulus b) boolean
c) comment d) variable

5. Symbol used for modulus

a) & b) **
c) % d) #

6. A data type than can have one of two values: True or False

a) modulus b) interpreter
c) variable d) boolean

7. Used to make comments

a) () b) %
c) ** d) #

1/5
Python

8. The correct way to write a variable in Python?

a) my Variable = 10 b) myVariable is 10
c) myVariable = 10 d) myVariable: 10

9. 102 = 100
Which of the following is used in Python to calculate ten squared?

a) 10 ** 10 b) 10 ** 2
c) 10 * 2 d) 10 % 2

10. To solve a problem that requires the user to enter 10 numbers would use what type of iteration?

a) Selection b) For loop


c) While loop d) Variable

11. A data type consisting of numbers, letters and symbols.

a) Boolean b) Integer
c) String d) Float

12. Code executed based on a condition being true

a) Iteration b) Selection
c) Sequence d) Variable

13. What will the output be from the following code?


print(Hello world!)

a) Hello world! b) SyntaxError


c) Hello world d) print(Hello world!)

14. What will the output be from the following code?


print(3+4)

a) 3+4 b) print(3+4)
c) 7 d) SyntaxError

15. What will the output be from the following code?


print("3+4")

a) 3+4 b) SyntaxError
c) 7 d) 34

2/5
Python

16. What will the output be from the following code?


print("Hello" + "world!")

a) SyntaxError b) Helloworld!
c) "Hello" "world!" d) Hello world!

17. Which Python command is used to output information to the screen?

a) print b) read
c) display d) output

3/5
Python

Answer Keys

1. b) variable 2. a) modulus 3. b) """

4. c) comment 5. c) % 6. d) boolean

7. d) # 8. c) myVariable = 10 9. b) 10 ** 2

10. b) For loop 11. c) String 12. b) Selection

13. b) SyntaxError 14. c) 7 15. a) 3+4

16. b) Helloworld! 17. a) print

4/5
Python

5/5
Python-ICT

Worksheets Name

Python-ICT Class
Total questions: 20
Worksheet time: 9mins Date

1. What is an elif statement?

a) Is an optional statement b) Allows you to check multiple expressions


c) Helps learn d) Is a statement which is used for a court order

2. What is a data type?

a) defined by the values it can take or the operations b) Where there are different kinds/types of data
that can be performed provided
c) Shows you what different types of data are provided d) Used in ICT on google slides

3. What programming is used for coding

a) Python b) Anaconda
c) Snail d) Snake

4. What form is used for whole numbers?

a) string b) boolean
c) float d) integer

5. Which data type is words?

a) Float b) Boolean
c) String d) Integer

6. What form is used for decimal number?

a) String b) Integer
c) Float d) Boolean

7. Which data type is used for T/F

a) String b) Boolean
c) Integer d) Float

1/5
Python-ICT

8. ==
What does this symbol mean?

a) Less than or equal to b) Less than


c) Not equal to d) Equal to

9. !=
What is this symbol

a) Less than b) Equal to


c) Not equal to d) Greater than or equal to

10. <
What is this symbol?

a) Equal to b) Less than or equal to


c) Less than d) Greater than

11. What is the name of the error that shows up on python

a) Syntax b) Error
c) Here d) Syntax Error

12. What are if statements known as?

a) Statements b) ICT
c) Python Code d) Selection

13. What is this quiz

a) Python b) Help
c) Other d) Revision

14. What is syntax?

a) Syntax is the rules of the programming language b) It is used to output information


c) Syntax is the word used to describe an error d) It is used to read information

15. What is python named after

a) The snake b) Television show called Monty Python

16. What will the output be from the following code?


print(Hello world!)

a) SyntaxError b) Hello world!


c) Hello world d) print(Hello world!)

2/5
Python-ICT

17. What will the output be from the following code?


print("Hello world!" * 2)

a) Hello world!Hello world! b) Hello world world!


c) Hello world! * 2 d) TypeError

18. If you want more than one option for your code, what do you use (after if)?

a) ifif b) else
c) elif

19. people = ["John", "Rob", "Bob"]


print (people[1])
what would this result be?

a) John b) Bob
c) Rob

20. What is the word (command) used to display numbers and text on the screen?

a) output b) print
c) command d) input

3/5
Python-ICT

Answer Keys

1. b) Allows you to , Is an 2. a) defined by the values it can 3. a) Python


check multiple a) optional take or the operations that
expressions statement can be performed

4. d) integer 5. c) String 6. c) Float

7. b) Boolean 8. d) Equal to 9. c) Not equal to

10. c) Less than 11. d) Syntax Error 12. d) Selection

13. d) Revision 14. a) Syntax is the rules of the 15. b) Television show called
programming language Monty Python

16. a) SyntaxError 17. a) Hello world!Hello world! 18. c) elif

19. c) Rob 20. b) print

4/5
Python-ICT

5/5

You might also like