Python Basics MCQs 7

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

1. What is the output of the following? 'hello'.upper()

 
 
 
 

2. What is the outcome of the following operation? [1,2,3] + [1,1,1]

 
 
 
 

3. In Python 3, what data type does variable x hold after the operation: x = 1/1?

 
 
 
 

4. What is the result of the following: int(3.99)?

 
 
 
 

5. What data type is represented by “7.1”?

 
 
 
 

6. For the string “Fun Python” stored in a variable $x$, what will be the output of `x[0:5]`?

 
 
 
 

7. Which line of code will act as required for implementing the following equation? $y =2x^2 − 3$

 
 
 
 

8. Consider the following tuple A=(1,2,3,4,5). What is the outcome of the following? A[1:4]

 
 
 
 

9. Consider the following tuple: say_what=('say','what','you','will')What is the result of the following? say_what[-1]

 
 
 
 

10. In Python, what is the output of the following operation? '5'+'6'

 
 
 
 

11. What is the output of the following code segment? int(False)

 
 
 
 

12. What is the output of the following? str(1+1)

 
 
 
 

13. What is the output of the following code segment? type(int(12.3))

 
 
 
 

14. What is the output of the following? "ABC".replace("AB", "ab")

 
 
 
 

15. What is the outcome of the following? 1=2

 
 
 
 

16. What is the value of x after the following is run:
x=4
x=x/2

 
 
 
 

17. What is the result of the operation: 11//2

 
 
 
 

18. What is the data type of the entity 43?

 
 
 
 

19. Consider the following list B=[1,2,[3,'a'],[4,'b']].  What is the result of B[3][1]?

 
 
 
 

20. What data type does 3.12323 represent?

 
 
 
 

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

Big Data MCQs Quiz

Leave a Reply

Discover more from R Language Frequently Asked Questions

Subscribe now to keep reading and get access to the full archive.

Continue reading