Python Quiz 4

Python Quiz 4

University

9 Qs

quiz-placeholder

Similar activities

Python Basics

Python Basics

6th Grade - University

10 Qs

Pertemuan 3

Pertemuan 3

University

10 Qs

GRADE 10 ТЖБ

GRADE 10 ТЖБ

University

9 Qs

codestorm

codestorm

University

10 Qs

Quiz 8

Quiz 8

University

11 Qs

Datentypen, Variablen & Eingabe in Python

Datentypen, Variablen & Eingabe in Python

University

10 Qs

CodeHS Basic Data Structures in Python

CodeHS Basic Data Structures in Python

9th Grade - University

10 Qs

Python quiz

Python quiz

10th Grade - Professional Development

10 Qs

Python Quiz 4

Python Quiz 4

Assessment

Quiz

Computers

University

Hard

Created by

ENDURO SRM

Used 2+ times

FREE Resource

9 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

If str_1 = "Coders", which of the following codes will print ' r ' ?

print(str_1[4])

print(str_1[4:5])

print(str_1[-2])

All of these

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

What will be the output?

Pe

e

Pol

Peop

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

How can we print reverse of a string str_1 ?

str_1.reverse( )

str_1 [ : : -1 ]

reverse(str_1)

str_1 [ -1 : 0 ]

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which operator can be used to concatenate variable and values of any data type?

comma ( , ) operator

concatenate (+) operator

join operator

addition (+) operator

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What can be used to declare multi line comments?

triple quotes

( ''' .... ''' )

double quotes

( '' .... '' )

hash tag (#)

All of these

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the correct way to use len( ) function to find length of a string word1 ?

word1.len( )

len(word1)

str.len(word1)

string.len(word1)

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the correct way to use lower( ) method on a string word1 ?

word1.lower( )

lower(word1)

str.lower(word1)

string.lower(word1)

8.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

What will be output of this code?

0

1

2

Error

9.

OPEN ENDED QUESTION

3 mins • Ungraded

Any Feedback/ Suggestions/ Comments

Evaluate responses using AI:

OFF