PYTHON-STRINGS

PYTHON-STRINGS

University

10 Qs

quiz-placeholder

Similar activities

javaquizvivek

javaquizvivek

University

12 Qs

IEEE Coding Competition

IEEE Coding Competition

University

13 Qs

На сколько ты знаешь C#

На сколько ты знаешь C#

University

10 Qs

unidad4

unidad4

University

10 Qs

Strings in C

Strings in C

University

10 Qs

Basic C Knowledge Exercise

Basic C Knowledge Exercise

University

10 Qs

Post Test Serial Komunikasi

Post Test Serial Komunikasi

University

10 Qs

Java quiz

Java quiz

University

8 Qs

PYTHON-STRINGS

PYTHON-STRINGS

Assessment

Quiz

Computers

University

Hard

Created by

RAVINDER B

Used 2+ times

FREE Resource

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
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?