Pythondex
Blog

Which Of The Following Declarations Is Incorrect In Python Language MCQ.

Last updated January 31, 2024 by Jarvis Silva

Want to test your python programming knowledge, then you are at the right place in this article. You can test your python knowledge by answering which of the following declarations is incorrect in python language MCQ.

It is a type of MCQ where you will have to tell an incorrect python declaration from the given choices.

This python MCQ will help you to improve your python knowledge and make you a better python programmer. If you want another python MCQ you can go here: What will be the output of following python code MCQ.  

You can test each declaration in this online python compiler.

1. Which of the following declaration is incorrect?

  1. print(‘Hello world’)
  2. print(`Hello world`)
  3. print(“Hello world”)
  4. All of the above

Show Answer

2. Which of the following declaration is incorrect?

  1. nums = 100 200 300 400
  2. nums = 100,200,300,400
  3. nums = 100200300400
  4. All of the above

Show Answer

3. Which of the following declaration is incorrect?

  1. print(“Very Good’)
  2. print(“Hello world“)
  3. print(‘Hello world’)
  4. All of the above

Show Answer

4. Which of the following declaration is incorrect?

  1. if (n < 1): // code
  2. if n > 1: // code
  3. if (n > 1) { // code }
  4. All of the above

Show Answer

5. Which of the following declaration is incorrect?

  1. print(‘Hello world’)
  2. print(`Hello world`)
  3. print(“Hello world”)
  4. All of the above

Show Answer

6. Which of the following declaration is incorrect?

  1. num_1 = 1
  2. num = 1
  3. 1num = 1
  4. All of the above

Show Answer

7. Which of the following declaration is incorrect?

  1. my-name = ‘stark’
  2. my_name = ‘stark’
  3. myname = ‘stark’
  4. All of the above

Show Answer

8. Which of the following declaration is correct for declaring function in python?

  1. def hello: //code
  2. def hello(num): //code
  3. def hello(): //code
  4. All of the above

Show Answer

9. Which of the following declaration is correct for declaring list in python?

  1. nums = [1,2,3,4,5]
  2. nums = (1,2,3,4,5)
  3. nums = 1,2,3,4,5
  4. All of the above

Show Answer

10. Which of the following declaration is incorrect?

  1. import <math>
  2. import math
  3. import “math”
  4. All of the above

Show Answer

These were all questions for this mcq, I hope you found this MCQ Article helpful and useful do share it with your friends who might find it helpful.

We will update this article with more MCQ questions so to get updates of this blog join our Telegram Channel we post all our blog updates and resources.

Thanks for reading, Have a nice day 🙂