Programming2-Q2-Assessment

Programming2-Q2-Assessment

12th Grade

21 Qs

quiz-placeholder

Similar activities

Data structure test1

Data structure test1

12th Grade

20 Qs

Latihan Soal Administrasi Infrastruktur Jaringan XII TKJ

Latihan Soal Administrasi Infrastruktur Jaringan XII TKJ

10th - 12th Grade

20 Qs

Microcontrolere Noțiuni generale. Structura internă

Microcontrolere Noțiuni generale. Structura internă

KG - 12th Grade

16 Qs

TEST1.PY

TEST1.PY

10th Grade - University

20 Qs

TestJava65_01

TestJava65_01

12th Grade

20 Qs

Berpikir Komputasional

Berpikir Komputasional

9th - 12th Grade

20 Qs

Programming2-Q2-Assessment

Programming2-Q2-Assessment

Assessment

Quiz

Computers

12th Grade

Practice Problem

Medium

Created by

Julio Fuentes

Used 3+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

21 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

Which of the following is a valid variable name in Python?

a. 2var_name
b. my_variable
c. variable name

d. global - variable

2.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

What is the correct way to declare a string variable in Python?

a. string name = "Hello"
b. str_name = "Hello"
c. "Hello" = str_name
d. name = Hello

3.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

In Python, what list method is used to get the length of a list?

a. size()
b. length()
c. len()
d. count()

4.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

How do you access the first element of a list in Python?

a. list[0]
b. list[first]
c. list(1)
d. list.first()

5.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

What method is used to add an element to the end of a list in Python?

a. append()
b. insert()
c. add()
d. extend()

6.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

What is the result of the following code: my_str = "1, 2, 3," + "4, 5"?

a. "1, 2, 3, 4, 5"
b. [[1, 2, 3], [4, 5]]
c. "1, 2, 3, "4, 5"
d. Error

7.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

How do you remove the last element in a list in Python?

a. list.remove(value)
b. list.pop()
c. list.delete(element)
d. list.exclude(element)

Create a free account and access millions of resources

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?