Python Workshop Quiz

Python Workshop Quiz

1st Grade

15 Qs

quiz-placeholder

Similar activities

Topic 9: Communication

Topic 9: Communication

1st Grade

10 Qs

Lenguajes programación y Desarrollo

Lenguajes programación y Desarrollo

KG - 5th Grade

14 Qs

Management Chapter 4

Management Chapter 4

1st - 3rd Grade

10 Qs

Apply for a job

Apply for a job

1st - 5th Grade

10 Qs

Rynek pracy

Rynek pracy

1st Grade

20 Qs

Basic Accounting

Basic Accounting

1st Grade

17 Qs

CASH FLOW

CASH FLOW

1st Grade

12 Qs

Moje CV

Moje CV

1st Grade

12 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?