Python Training Day-4 Quiz-4

Python Training Day-4 Quiz-4

Professional Development

10 Qs

quiz-placeholder

Similar activities

Node.js

Node.js

KG - Professional Development

8 Qs

Simple Easy Basic Lua Quiz

Simple Easy Basic Lua Quiz

4th Grade - Professional Development

10 Qs

PE2 Module 3

PE2 Module 3

KG - Professional Development

11 Qs

SLG ULI101 Week 10

SLG ULI101 Week 10

Professional Development

11 Qs

Introduction

Introduction

Professional Development

10 Qs

JF UIT 2022 - Game 3

JF UIT 2022 - Game 3

Professional Development

15 Qs

Quiz 3.5

Quiz 3.5

Professional Development

15 Qs

Flutter_Q5

Flutter_Q5

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?