Python Training Day-4 Quiz-4

Python Training Day-4 Quiz-4

Professional Development

10 Qs

quiz-placeholder

Similar activities

ABREDES - Devasc Python

ABREDES - Devasc Python

Professional Development

14 Qs

Python Class 1

Python Class 1

Professional Development

15 Qs

CodeTigers Python 101

CodeTigers Python 101

KG - Professional Development

10 Qs

for loops & while loops

for loops & while loops

University - Professional Development

10 Qs

Python Quiz

Python Quiz

9th Grade - Professional Development

10 Qs

Python Training Day-2  Quiz-2

Python Training Day-2 Quiz-2

Professional Development

10 Qs

Scope of Variables in Python

Scope of Variables in Python

1st Grade - Professional Development

15 Qs

Basic Python

Basic Python

Professional Development

10 Qs

Python Training Day-4 Quiz-4

Python Training Day-4 Quiz-4

Assessment

Quiz

Computers

Professional Development

Hard

Created by

kamaljeet singh kalsi

Used 4+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

What will be the output of the following Python code?

>>>print (r"\nhello")

a new line and hello

\nhello

the letter r and then hello

error

2.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

What will be the output of the following Python statement?

>>>print('new' 'line')

Error

Output equivalent to print ‘new\nline’

newline

new line

3.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

What will be the output of the following Python code?

>>>str1="helloworld"

>>>str1[::-1]

dlrowolleh

hello

world

helloworld

4.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

What will be the output of the following Python code?

print(0xA + 0xB + 0xC)

0xA0xB0xC

Error

0x22

33

5.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

What will be the output of the following Python code?

>>>example = "snow world"

>>>example[3] = 's'

>>>print example

snow

snow world

Error

snos world

6.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

What function do you use to read a string?

input(“Enter a string”)

eval(input(“Enter a string”))

enter(“Enter a string”)

eval(enter(“Enter a string”))

7.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

What keyword would you use to add an alternative condition to an if statement?

else if

elseif

elif

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?