Session 1LNMIIT
Quiz
•
Professional Development
•
Professional Development
•
Hard
Rajeev Agarwa
Used 3+ times
FREE Resource
30 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Please select the correct expression to reassign a global variable “x” to 20 inside a function fun(1)
x = 50
def fun1():
# your code to assign global x = 20
fun1()
print(x) # it should print 20
global x = 20
global var x
x = 20
global.x= 20
global x
x = 20
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
In Python3, Whatever you enter as input, the input() function converts it into a string
True
False
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the output of the following print() function
print('%d %d %.2f' % (11, '22', 11.22))
11 22 11.22
TypeError
11 '22' 11.22
None of the above
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the output of the following print() function
print(sep = '--', 'Ben', 25, 'California')
Syntax Error
Ben-25-California
Ben 25 California
None of these
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What will be displayed as an output on the screen
x = float('NaN')
print('%f, %e, %F, %E' % (x, x, x, x))
nan, nan, NAN, NAN
nan, NaN, nan, NaN
NaN, NaN, NaN, NaN,
None of these
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Use the following file to predict the output of the code
test.txt Content:
aaa
bbb
ccc
ddd
eee
fff
ggg
Code:
f = open("test.txt", "r")
print(f.readline(3))
f.close()
bbb
Syntax Error
aaa
aa
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the output of the following code
print('Pnative ', end='//')
print(' is for ', end='//')
print(' Python Lovers', end='//')
Pnative /
is for /
Python Lovers /
Pnative //
is for //
Python Lovers //
Pnative // is for // Python Lovers//
Pnative / is for / Python Lovers/
Create a free account and access millions of resources
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple

Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?
Similar Resources on Wayground
25 questions
Management of Financial Services - 1
Quiz
•
University - Professi...
25 questions
Processes 6035-02 | Part 2
Quiz
•
Professional Development
26 questions
Know your Product Level 1
Quiz
•
1st Grade - Professio...
25 questions
Processes 6035-02 | Part 1
Quiz
•
Professional Development
25 questions
Block Exam November
Quiz
•
Professional Development
25 questions
BA 18 - SHORT QUIZ
Quiz
•
Professional Development
26 questions
U 7 Top Notch 1
Quiz
•
Professional Development
25 questions
Common RA's in LEPT
Quiz
•
Professional Development
Popular Resources on Wayground
20 questions
Brand Labels
Quiz
•
5th - 12th Grade
10 questions
Ice Breaker Trivia: Food from Around the World
Quiz
•
3rd - 12th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
20 questions
ELA Advisory Review
Quiz
•
7th Grade
15 questions
Subtracting Integers
Quiz
•
7th Grade
22 questions
Adding Integers
Quiz
•
6th Grade
10 questions
Multiplication and Division Unknowns
Quiz
•
3rd Grade
10 questions
Exploring Digital Citizenship Essentials
Interactive video
•
6th - 10th Grade