Exploring Python Fundamentals

Exploring Python Fundamentals

8th Grade

13 Qs

quiz-placeholder

Similar activities

Lesson 8 - Web content

Lesson 8 - Web content

8th Grade

10 Qs

Banana Tales Lessons 3 & 4 Vocabulary

Banana Tales Lessons 3 & 4 Vocabulary

3rd Grade - University

10 Qs

Modules, Packages, and Libraries

Modules, Packages, and Libraries

8th Grade

10 Qs

Loops

Loops

8th Grade

10 Qs

Coding 300: JavaScript/Python Vocab

Coding 300: JavaScript/Python Vocab

7th - 8th Grade

10 Qs

Learning Loops/Iterative Statements

Learning Loops/Iterative Statements

6th - 8th Grade

10 Qs

Exploring Python Turtle Graphics

Exploring Python Turtle Graphics

7th Grade - University

12 Qs

Iterative Statements in Python

Iterative Statements in Python

8th Grade

18 Qs

Exploring Python Fundamentals

Exploring Python Fundamentals

Assessment

Quiz

Computers

8th Grade

Hard

Created by

Dumbani Tunthuwa

FREE Resource

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.

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?