Dear candidates you will find MCQ questions of Python here. Learn these questions and prepare yourself for coming examinations and interviews. You can check the right answer of any question by clicking on any option or by clicking view answer button.
Share your questions by clicking Add Question
R
Q. What is the output of the following piece of code?
#mod1 def change(a): b=[x*2 for x in a] print(b) #mod2 def change(a): b=[x*x for x in a] print(b) from mod1 import change from mod2 import change #main s=[1,2,3] change(s)
R
Q. What is the output of the following program?
tday=datetime.date.today() print(tday.month())
R
Q. Which of the following formatting options can be used in order to add „n? blank spaces after a given string „S??
R
Q. What is the output of the following program?
f = None for i in range (5): with open("data.txt", "w") as f: if i > 2: break print(f.closed)
R
Q. To read the entire remaining contents of the file as a string from a file object infile, we use
R
Q. Suppose t = (1, 2, 4, 3), which of the following is incorrect?
S
Q. Who developed Python Programming Language?
S
Q. Which type of Programming does Python support?
S
Q. Is Python case sensitive when dealing with identifiers?
S
Q. Which of the following is the correct extension of the Python file?
Don't have account? Register here.