← Quiz: Reviewing AI Code: all 10 questions
Quiz: Reviewing AI Code · Question 2 of 10
What is the right type for storing rupee amounts?
What is the right type for storing rupee amounts?
- A.float
- B.Integer paise or Decimal
- C.str only
- D.complex
Answer & explanation
Correct answer: Integer paise or Decimal
Floats can't represent most decimal fractions exactly; 0.1 + 0.2 != 0.3.
Can you get the rest right without peeking?
Take the timed Quiz: Reviewing AI Code quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →