Python Programming Quiz-02

Python Programming Quiz-02

Professional Development

26 Qs

quiz-placeholder

Similar activities

Quiz on Fuses and Circuit Breakers

Quiz on Fuses and Circuit Breakers

Professional Development

21 Qs

disconnect/reconnect 01

disconnect/reconnect 01

Professional Development

21 Qs

1 week Quiz

1 week Quiz

Professional Development

23 Qs

SET B - DPWH

SET B - DPWH

Professional Development

24 Qs

TECH SAVVY - PRELIMS

TECH SAVVY - PRELIMS

Professional Development

25 Qs

Pre Test in Soil

Pre Test in Soil

Professional Development

25 Qs

Martensite, Austenite, and Ferrite

Martensite, Austenite, and Ferrite

Professional Development

21 Qs

List MCQ

List MCQ

Professional Development

21 Qs

Python Programming Quiz-02

Python Programming Quiz-02

Assessment

Quiz

Engineering

Professional Development

Practice Problem

Medium

Created by

pragya _CSE

Used 1+ times

FREE Resource

AI

Enhance your content in a minute

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

26 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the output of the following code? s = "Python Programming" print(s[::-1])

Python Programming

gnimmargorP nohtyP

Programming Python

Error

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which string method is used to check if a string starts with a specific prefix?

startswith()

endswith()

contains()

find()

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which of the following is a valid way to call a function defined as def my_function(a, b=3):?

my_function(5, 7)

my_function(5)

my_function(a=5, b=7)

All of the above

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the result of the following code? lst = [10, 20, 30, 40, 50] print(lst[1:4])

[10, 20, 30]

[20, 30, 40]

[30, 40, 50]

[40, 50]

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which method adds an element to the end of a list?

insert()

append()

extend()

add()

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the result of the following code? lst = [1, 2, 3] lst.extend([4, 5]) print(lst)

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

[1, 2, 3, 4, 5]

[4, 5]

Error

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which of the following statements is true about tuples?

Tuples are mutable.

Tuples are defined using square brackets.

Tuples can contain duplicate elements.

Tuples do not allow mixed data types.

Access all questions and much more by creating a free account

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?