Python Workshop Quiz

Python Workshop Quiz

1st Grade

15 Qs

quiz-placeholder

Similar activities

Bản Viên - Get Started with Power Automate

Bản Viên - Get Started with Power Automate

1st - 3rd Grade

11 Qs

Business Management

Business Management

1st - 3rd Grade

10 Qs

Publication Workshop Quiz

Publication Workshop Quiz

1st Grade

10 Qs

Algorithm

Algorithm

1st - 5th Grade

18 Qs

Personal Statement Quiz

Personal Statement Quiz

1st Grade

12 Qs

Fun with Goods and Services

Fun with Goods and Services

1st Grade

10 Qs

Rynek pracy

Rynek pracy

1st Grade

20 Qs

Post Test Sosialisasi H1

Post Test Sosialisasi H1

1st - 3rd Grade

20 Qs

Python Workshop Quiz

Python Workshop Quiz

Assessment

Quiz

Business

1st Grade

Hard

Created by

CS_116_SURYANSH SINGH

Used 4+ times

FREE Resource

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

  1. Which keyword is used to declare a variable in Python?

var

declare

define

none of the above

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

  1. What is the output of the following code snippet?

  2. my_tuple = ("apple", "banana", "cherry")

    print(my_tuple[1])

"banana"

"apple"

"cherry"

TypeError:

'tuple' object has no attribute '1'

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

  1. Which of the following is NOT a valid data type in Python?

  1. int

  1. float

  1. string

  1. character

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

  1. What is the output of the following code snippet?

my_list = [1, 2, 3, 4, 5]

print(my_list[1:3])

[1, 2]


[2, 3]

[3, 4]

[1, 2, 3]

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

  1. How do you check the number of elements in a set in Python?

  1. elements(my_set)

  1. len(my_set)

  1. count(my_set)

  1. size(my_set)

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

  1. What does the append() method do in Python?

  1. Removes an element from a list

  1. Adds an element to the start of a list

  1. Adds an element to the end of a list

Reverses the order of elements in a list

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

  1. How do you remove an item from a list in Python?

  1. discard(item)

  1. delete(item)

  1. pop(item)

remove(item)

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?