1. Home
  2. Data Science
  3. Python
  4. Which of the following is not a valid way to represent an…

Added 4 May 2024

Which of the following is not a valid way to represent an integer in Python?

  1. 100
  2. 0xFF
  3. 3.14 Correct answer
  4. -42

Correct answer

C. 3.14

16 views

MCQSEXAM

Explanation

Integers do not contain decimal points. 3.14 is a float, not an integer.

Doubts & discussion

Not sure why the answer is C? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More Python MCQs

Practise all Python MCQs

Similar MCQs