Search Header Logo

Exploring Python Fundamentals

Authored by Dumbani Tunthuwa

Computers

8th Grade

Exploring Python Fundamentals
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

13 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What are the basic data types in Python?

char, list, tuple, dict

int, float, array, set

string, number, boolean, object

int, float, str, bool

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you declare a variable in Python?

variable_name : value

let variable_name = value

var variable_name = value

You declare a variable in Python by using the syntax: variable_name = value.

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the difference between a list and a tuple in Python?

Lists can contain only numbers; tuples can contain any data type.

Lists are mutable; tuples are immutable.

Tuples are mutable; lists are immutable.

Lists are faster than tuples in all cases.

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What control structure would you use to repeat a block of code?

Variable

Loop

Condition

Function

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you create a conditional statement in Python?

Use 'for' and 'while' to create loops.

Use 'if', 'elif', and 'else' to create conditional statements.

You can only use 'if' for conditional statements.

Conditional statements are created with 'switch' and 'case'.

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the expression 5 + 3 * 2?

8

11

10

16

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you check if a number is even in Python?

Use the expression n / 2 == 1.

Use the expression n % 2 == 0.

Use the expression n - 2 == 0.

Check if n is divisible by 3.

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?