ADITYA CODING CLUB
Aditya College of Engineering, Madanapalle
Python Programming Test-12
1. Test contains 10 Questions 
2. Each Question Carries 1 Mark
Roll Number: *
Type Valid Roll Number 
Name of the Student: *
Department *
Year of Course: *
Required
Section  *
1.  What is the output of print(abs(-45.300)) *
1 point
2. What is the type of the following variable

x = -5j

*
1 point
3.  Which one of the following is the right way to close a file? *
1 point
4.  What will be the output of the following Python code?
i = 1 while True: if i%3 == 0: break print(i)   i + = 1
*
1 point
5. What will be the output of the following Python code snippet if x=1?
x<<2
*
1 point
6. What will be the output of the following Python code snippet?
for i in [1, 2, 3, 4][::-1]: print (i)
*
1 point
7. What will be the output of the following Python program?
def foo(x): x[0] = ['def'] x[1] = ['abc'] return id(x) q = ['abc', 'def'] print(id(q) == foo(q))
*
1 point
8. Which of the following Python statements will result in the output: 6?
A = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]
*
1 point
9. What will be the output of the following Python code?

print("Hello {0[0]} and {0[1]}".format(('foo', 'bin')))
*
1 point
10.   ______ is a string literal denoted by triple quotes for providing the specifications of certain program elements. *
1 point
Submit
Clear form
Never submit passwords through Google Forms.
This content is neither created nor endorsed by Google. Report Abuse - Terms of Service - Privacy Policy