Python L1

Python L1

8th Grade

14 Qs

quiz-placeholder

Similar activities

class 11 - basic concepts in python 1

class 11 - basic concepts in python 1

11th Grade

19 Qs

GCSE Computer Science - Programming Keywords

GCSE Computer Science - Programming Keywords

9th - 12th Grade

15 Qs

Quiz 1

Quiz 1

University

10 Qs

Python Recap

Python Recap

9th - 11th Grade

19 Qs

Python - Input, print and operators.

Python - Input, print and operators.

9th - 10th Grade

17 Qs

Python Year 9 Quiz

Python Year 9 Quiz

8th - 10th Grade

19 Qs

Year 8 Python - Lesson 3

Year 8 Python - Lesson 3

6th - 8th Grade

19 Qs

Homework 1- Python Basics

Homework 1- Python Basics

8th Grade

10 Qs

Python L1

Python L1

Assessment

Quiz

Computers

8th Grade

Medium

Created by

Zaheer Abbas

Used 1+ times

FREE Resource

14 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of an if statement in Python?

To create loops in the code.

To execute code conditionally based on a boolean expression.

To define functions in Python.

To handle exceptions and errors.

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you write a basic if statement in Python?

if condition: do_something

if (condition) { do_something }

if: condition then do_something

if condition do_something

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the syntax for an if-else statement in Python?

if condition: do_something else: do_something_else

if condition do_something else do_something_else

if (condition) { do_something } else { do_something_else }

if condition: do_something; else: do_something_else

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the 'elif' keyword stand for in Python?

else if

next if

if else

else when

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the difference between '==' and '===' in Python?

In Python, '==' checks for value equality, while '===' does not exist.

Both '==' and '===' are used for strict comparison in Python.

'===' is a valid operator in Python for checking both type and value.

'==' checks for type equality, while '===' checks for value equality.

6.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Media Image
Which of the following is not a valid data type?
Fraction
Float
String
Integer

7.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Media Image
Quotation marks around a variable’s identifier imply that it is a:
String
Integer
Character
List

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?