PYTHON-STRINGS

PYTHON-STRINGS

University

10 Qs

quiz-placeholder

Similar activities

PYTHON BASICS PART 1

PYTHON BASICS PART 1

University

10 Qs

DSA quiz 3 set 1

DSA quiz 3 set 1

University

10 Qs

Types of Mass Media

Types of Mass Media

10th Grade - Professional Development

11 Qs

C Operators and Expressions 01

C Operators and Expressions 01

University

10 Qs

IP-Com3 - Clase 2

IP-Com3 - Clase 2

University

12 Qs

Python Quiz

Python Quiz

University

15 Qs

Recap Chapter 6, 7, 8

Recap Chapter 6, 7, 8

University

11 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

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?

Discover more resources for Computers