Python - MCQ
Enter your name.
1.The function X that does not return any value, What value is thrown by it by default?
2. Following set of commands are executed in shell, what will be the output?
3. What error occurs when you execute a = b?
4. Carefully observe the code. Which of the following is correct?
It gives an indentation error
It gives the output as None
It gives the output as ‘hellohello’
It gives the output as ‘hello2hello2’
It says cannot perform mathematical operation on strings
5. Carefully observe the code and give the answer. Which of the following result(s) in a(are) Syntax Error(s)?
B and C only
B and D only
A, B and D only
6. In python data types directly interpreted by the compiler, so consider the following operation to be performed. >>x = 13 ? 2 Objective is to make sure x has a integer value. Which of the following statement(s) is/are true?
A and B Only
A, B and D Only
7. Select the option that print hello-how-are-you
print(‘hello’, ‘how’, ‘are’, ‘you’)
print(‘hello’, ‘how’, ‘are’, ‘you’ + ‘-‘ * 4)
print(‘hello’ + ‘-‘ + ‘how’ + ‘-‘ + ‘are’ + ‘-‘ + ‘you’)
print(‘hello‘ + ‘how-are-you’)
None of the above
Page 1 of 1
Never submit passwords through Google Forms.
This content is neither created nor endorsed by Google.
Terms of Service