Python Workshop Quiz

Python Workshop Quiz

1st Grade

15 Qs

quiz-placeholder

Similar activities

LAUNDRY 1 SMK PURIWISATA

LAUNDRY 1 SMK PURIWISATA

1st Grade - University

20 Qs

Business and Economics

Business and Economics

1st - 6th Grade

20 Qs

INCOTERMS

INCOTERMS

1st - 3rd Grade

20 Qs

Revamped New Hire Induction

Revamped New Hire Induction

KG - 12th Grade

15 Qs

My ADS Telkomsel

My ADS Telkomsel

1st Grade

10 Qs

Basic Programming 2

Basic Programming 2

1st - 10th Grade

10 Qs

Apply for a job

Apply for a job

1st - 5th Grade

10 Qs

Bienvenu @ Trace One

Bienvenu @ Trace One

1st - 3rd Grade

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