Search Header Logo

Strings in Python

Authored by Chaitrali Kardile

Computers

University

Used 1+ times

Strings in Python
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

100 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the result of 'abc' + 'def'?

'abcdef'
'abc def'
'abc+def'
Error

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which function converts a character to its ASCII value?

ord()
chr()
ascii()
code()

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of 'Python'[:3]?

'Pyt'
'yth'
'hon'
Error

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does 'in' operator do in strings?

Checks membership
Concatenates strings
Multiplies strings
Deletes a string

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the result of 'abc' + 'def'?

'abcdef'
'abc def'
'abc+def'
Error

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which function converts a character to its ASCII value?

ord()
chr()
ascii()
code()

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of 'Python'[:3]?

'Pyt'
'yth'
'hon'
Error

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

Microsoft

Continue with Microsoft

or continue with

Facebook

Facebook

Apple

Apple

Others

Others

Already have an account?