Python Basics Challenge

Python Basics Challenge

8th Grade

23 Qs

quiz-placeholder

Similar activities

Python Hp1

Python Hp1

6th - 9th Grade

22 Qs

Python Quiz #1

Python Quiz #1

8th Grade

22 Qs

Season 4 #Spaic Python Weekly Quiz

Season 4 #Spaic Python Weekly Quiz

KG - Professional Development

20 Qs

Season 2 #Spaic Python Weekly Quiz

Season 2 #Spaic Python Weekly Quiz

KG - Professional Development

20 Qs

MP3-9WKS-Review

MP3-9WKS-Review

8th Grade

24 Qs

programming 1

programming 1

5th - 12th Grade

18 Qs

Escape Sequences

Escape Sequences

6th - 11th Grade

20 Qs

Python quiz

Python quiz

7th - 12th Grade

25 Qs

Python Basics Challenge

Python Basics Challenge

Assessment

Quiz

Other

8th Grade

Hard

Created by

Rubies Technologies

Used 1+ times

FREE Resource

23 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

15 mins • 1 pt

What are the basic data types in Python?

char, decimal, array, object

int, float, str, bool, list, tuple, set, dict

integer, real, text, map

string, number, boolean, collection

2.

MULTIPLE CHOICE QUESTION

15 mins • 1 pt

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

11

8

16

10

3.

MULTIPLE CHOICE QUESTION

15 mins • 1 pt

How do you create a list in Python?

You create a list in Python by using the list() function, e.g., my_list = list(1, 2, 3).

You create a list in Python using parentheses, e.g., my_list = (1, 2, 3).

You create a list in Python using curly braces, e.g., my_list = {1, 2, 3}.

You create a list in Python using square brackets, e.g., my_list = [1, 2, 3].

4.

MULTIPLE CHOICE QUESTION

15 mins • 1 pt

What method would you use to add an item to the end of a list?

push()

append()

add()

insert()

5.

MULTIPLE CHOICE QUESTION

15 mins • 1 pt

What is the difference between a list and a tuple?

A list is defined with {}, while a tuple is defined with []

A list is immutable and defined with [], while a tuple is mutable and defined with ().

A list can only contain numbers, while a tuple can contain any data type.

A list is mutable and defined with [], while a tuple is immutable and defined with ().

6.

MULTIPLE CHOICE QUESTION

15 mins • 1 pt

Charlotte has a list of her favorite books named 'my_list'. How does she access the first book in that list?

my_list.first()

my_list[1]

first(my_list)

my_list[0]

7.

MULTIPLE CHOICE QUESTION

15 mins • 1 pt

Aria is playing a game where she needs to pick a random number between 1 and 10. What does the random.randint(1, 10) function do in this context?

It returns a random integer N such that N < 1 or N > 10.

It returns a random integer N such that 1 <= N <= 10.

It selects a random element from a list of integers between 1 and 10.

It generates a random float between 1 and 10.

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?