The post is about Python Basics MCQs with Answers. There are 20 multiple-choice questions covering topics related to the basics of Python, data types, strings, tuples, lists, and different operations. Let us start with the Online Python Basics MCQs with Answers.
Online Python Basics MCQs with Answers
Online Python Basics MCQs with Answers
- What is the data type of the entity 43?
- What is the result of the following: int(3.99)?
- What is the result of the operation: 11//2
- What is the value of x after the following is run: x=4 x=x/2
- Which line of code will act as required for implementing the following equation? $y =2x^2 − 3$
- What is the output of the following code segment? type(int(12.3))
- What is the output of the following code segment? int(False)
- In Python, what is the output of the following operation? ‘5’+’6′
- What is the output of the following? ‘hello’.upper()
- What is the output of the following? str(1+1)
- What is the output of the following? “ABC”.replace(“AB”, “ab”)
- In Python 3, what data type does variable x hold after the operation: x = 1/1?
- What data type does 3.12323 represent?
- For the string “Fun Python” stored in a variable $x$, what will be the output of
x[0:5]
? - What data type is represented by “7.1”?
- Consider the following tuple: say_what=(‘say’,’what’,’you’,’will’)What is the result of the following? say_what[-1]
- Consider the following tuple A=(1,2,3,4,5). What is the outcome of the following? A[1:4]
- Consider the following list B=[1,2,[3,’a’],[4,’b’]]. What is the result of B[3][1]?
- What is the outcome of the following operation? [1,2,3] + [1,1,1]
- What is the outcome of the following? 1=2