PYTHON-STRINGS

PYTHON-STRINGS

University

10 Qs

quiz-placeholder

Similar activities

Pythonintro

Pythonintro

University

15 Qs

Access

Access

University

12 Qs

Python - Year 8

Python - Year 8

3rd Grade - University

10 Qs

Kuis Dadakan ;)

Kuis Dadakan ;)

10th Grade - University

15 Qs

Topic 4-2: Multiple if-else and switch-case

Topic 4-2: Multiple if-else and switch-case

University

10 Qs

Listen in Python

Listen in Python

University

10 Qs

Python Quiz Techno India

Python Quiz Techno India

University

10 Qs

Arduino TP02

Arduino TP02

University

10 Qs

PYTHON-STRINGS

PYTHON-STRINGS

Assessment

Quiz

Computers

University

Practice Problem

Hard

Created by

RAVINDER B

Used 2+ times

FREE Resource

AI

Enhance your content in a minute

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

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Choose the correct function to get the character from ASCII number

ascii(number)

chartacter(number)

char(number)

chr(number)

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Choose the correct function to get the ASCII code of a character

ord('char')

ord(number)

char('char')

ascii('char')

3.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Guess the correct output of the following code?

PYn PYnat ive PYnativ vitanYP

Yna PYnat tive PYnativ vitanYP

Yna PYnat tive PYnativ PYnativ

PYnativ Yna PYnat tive PYnativ

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Output is

str1 = 'Welcome'

print (str1[:6] + ' PYnative')

Welcom PYnative

Welcome PYnative

WelcomPYnative

WelcomePYnative

5.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

list1=[0,2,5,1]

str1="7"

for i in list1:

str1=str1+i

print(str1)

70251

7

15

error

6.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Which of the following will give "Simon" as output?

If str1="John,Simon,Aryan"

print(str1[-7:-12])

print(str1[-11:-7])

print(str1[-7:-11])

print(str1[-11:-6])

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

print('The sum of {0} and {1} is {2}'.format(2, 10, 12))

The sum of 2 and 10 is 12

The sum of 0 and 1 is 2

Error

None

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

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?