Basic Python

Basic Python

7 Qs

quiz-placeholder

Similar activities

TINKERCAD CODEBLOCK REVIEW FOR QUIZ

TINKERCAD CODEBLOCK REVIEW FOR QUIZ

7th Grade

12 Qs

Lesson Four - Sensing

Lesson Four - Sensing

KG - University

9 Qs

Expressions (6th CCSS)

Expressions (6th CCSS)

6th Grade

10 Qs

DSD QUIZZ 2 2023 Batch

DSD QUIZZ 2 2023 Batch

KG - University

10 Qs

L1 Python Recall - Do Now

L1 Python Recall - Do Now

KG - University

8 Qs

Graphing Functions, Function Notation, Zeros Quiz

Graphing Functions, Function Notation, Zeros Quiz

KG - University

12 Qs

Rhombi, Rectangles, and Squares

Rhombi, Rectangles, and Squares

KG - University

12 Qs

Data and Statistics

Data and Statistics

KG - University

12 Qs

Basic Python

Basic Python

Assessment

Quiz

others

Easy

Created by

Teerapat TREPOPSAKULSIN

Used 6+ times

FREE Resource

7 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Consider the following Python code

x = "22"

y = "2"

z = x + y

what is the value of z?

an integer with a value of 24
a float with a value of 24
a string with a value of 24
a string with a value of 222

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following variable names are not allowed?

class
type
int
_invalid

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What is the output of this code?

[2,4]
2, 4
24
2

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Consider the following python code x = 10.0 y = int(x/2 + 1) z = y * 2 what is the value of z
12
12.0
6
6.0

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Suppose we have the following list x = [2, 4, 7, 9, 21]

if we want to remove 7 from the list which line of code will fail?

x.pop(2)
x.remove(7)
x.pop(x.index(7))
x.pop(7)

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

what is the output of the following code x = ["Computer Science", "Programing Skills", "Computer Skills"] y = x[::3][0] z = y[:8:] print(z)
Computer
Science
Programing
Skills

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Fill in the blank so that the code outputs the correct result basket = ["apple", "cherry", "orange"] for fruit in basket: if fruit is cherry ____________ print(fruit) # output apple orange
break
continue
stop
None