Python  Quiz Year 9

Python Quiz Year 9

9th Grade

9 Qs

quiz-placeholder

Similar activities

Intro to Python Test

Intro to Python Test

3rd - 12th Grade

11 Qs

Python Programming

Python Programming

7th - 9th Grade

10 Qs

Python Basics

Python Basics

8th - 10th Grade

10 Qs

KS4 Programming Techniques (1)

KS4 Programming Techniques (1)

8th - 10th Grade

10 Qs

Python Loops

Python Loops

9th - 11th Grade

12 Qs

Y9 - Module 2 - KT1 Python Basics

Y9 - Module 2 - KT1 Python Basics

9th Grade

14 Qs

J277 Programming - Data Types

J277 Programming - Data Types

9th - 11th Grade

11 Qs

Python L1

Python L1

8th Grade - University

14 Qs

Python  Quiz Year 9

Python Quiz Year 9

Assessment

Quiz

Computers

9th Grade

Hard

Created by

Devinii Karunanithi

Used 1+ times

FREE Resource

9 questions

Show all answers

1.

OPEN ENDED QUESTION

3 mins • 1 pt

Project-Based Question In a Python program, how would you create a simple calculator function that can add, subtract, multiply, and divide?

Evaluate responses using AI:

OFF

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Functions How do you define a function in Python?

define functionName():

function functionName():

def functionName():

define functionName():

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Basic Input/Output How do you take user input in Python?

input()

get_input()

user_input()

receive_input()

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Error Handling What is the purpose of the 'try' and 'except' blocks in Python?

To execute code in any case

To handle errors gracefully

To stop the program immediately

To define a new variable

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Variables and Data Types What is the correct way to declare a variable in Python?

variableName = value

var Name = value

declare variableName = value

value = variableName

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Object-Oriented Programming (OOP) Which keyword is used to create a new instance of a class in Python?

new

create

instance

object

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Loops What is the purpose of the 'range()' function in a for loop?

To create a list of numbers

To specify the starting and ending points

To iterate through a sequence of numbers

To generate random numbers

8.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Conditional Statements Which keyword is used to check multiple conditions in Python?

if

elseif

else

elif

9.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

File Handling Which function is used to open a file in Python?

open_file()

read_file()

file_open()

open()