Python Basics Test

Python Basics Test

12th Grade

10 Qs

quiz-placeholder

Similar activities

Section 3D: Collect and process data using dictionaries

Section 3D: Collect and process data using dictionaries

12th Grade

15 Qs

Python Library-1

Python Library-1

12th Grade

11 Qs

Python: El lenguaje de programación que conquista el futuro

Python: El lenguaje de programación que conquista el futuro

12th Grade

10 Qs

Python

Python

1st - 12th Grade

10 Qs

Text File - Quiz

Text File - Quiz

12th Grade - University

10 Qs

CS Python Fundamentals Quiz 6 Review

CS Python Fundamentals Quiz 6 Review

9th - 12th Grade

10 Qs

Python-Expressions#1

Python-Expressions#1

12th Grade - University

10 Qs

PCEP Section 4C: Python Built-In Exceptions Hierarchy

PCEP Section 4C: Python Built-In Exceptions Hierarchy

12th Grade

15 Qs

Python Basics Test

Python Basics Test

Assessment

Quiz

Computers

12th Grade

Hard

Used 7+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is a variable in Python?

a) A keyword

b) A function

c) A container to store data

d) A loop

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is NOT a control flow construct in Python?

a) To create functions

b) if

c) elif

d) else

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following code? print("x is greater than 3") else: print("x is not greater than 3")

a) x is greater than 3

b) x is not greater than 3

c) Error

d) Nothing is printed

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of a function in Python?

a) To assign values to variables

b) To create data structures

c) To perform specific tasks and reuse code

d) To compare values

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is an example of an immutable data structure in Python?

a) List

b) Tuple

c) Dictionary

d) Set

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the key feature of a set in Python?

a) It allows duplicate elements

b) It is an ordered collection

c) It only stores integers

d) It contains unique elements

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How is exception handling implemented in Python?

a) Using try-except blocks

b) Using if-else statements

c) Using for loops

d) Using dictionaries

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?