Python Programming II CSE A

Python Programming II CSE A

12th Grade

20 Qs

quiz-placeholder

Similar activities

الوحدة 1- الشبكات السلكية واللاسلكية والانترنت -  حاسب 2

الوحدة 1- الشبكات السلكية واللاسلكية والانترنت - حاسب 2

10th - 12th Grade

20 Qs

After Effect Intoduction

After Effect Intoduction

10th Grade - University

15 Qs

Test

Test

KG - University

25 Qs

Pengetahuan Dasar Komputer

Pengetahuan Dasar Komputer

9th - 12th Grade

20 Qs

Visual Basic Assessment

Visual Basic Assessment

11th - 12th Grade

21 Qs

BIM1014 Quiz 2

BIM1014 Quiz 2

KG - University

15 Qs

PRUEBA CORTA I - SISTEMA E INSTALACIÓN DE SOFTWARE I - U4

PRUEBA CORTA I - SISTEMA E INSTALACIÓN DE SOFTWARE I - U4

9th - 12th Grade

15 Qs

CORLANG Week6-7

CORLANG Week6-7

10th Grade - University

20 Qs

Python Programming II CSE A

Python Programming II CSE A

Assessment

Quiz

Computers

12th Grade

Practice Problem

Hard

Created by

satish kumar

Used 4+ times

FREE Resource

AI

Enhance your content in a minute

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

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

What will be the output of the following code? x = 10 if x > 5: x += 2 else: x -= 2 print(x)

10

12

8

7

2.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Which of the following is correct about Python functions?

A function is defined using the def keyword

A function can return multiple values

A function can be passed as an argument to another function

All of the above

3.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

What will be the output of the following code? s = 'Hello' s = s[::-1] print(s)

olleH

Hello

oHell

lleHo

4.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Which of the following operations can be used to add an element to a list?

append()

extend()

insert()

All of the above

5.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

What will be the result of the following code? l = [1, 2, 3, 4] l[1:3] = [7, 8] print(l)

[1, 7, 8, 4]

[1, 2, 3, 4]

[1, 7, 4]

Error

6.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

What will be the output of the following code? my_set = {1, 2, 3, 4} my_set.add(2) print(my_set)

{1, 2, 3, 4}

{1, 2, 3}

{1, 2, 3, 4, 2}

Error

7.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Which method is used to remove a key from a dictionary and return its value?

del

remove()

pop()

discard()

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?