FAQ: Modules: Python - Modules Python Decimals


This community-built FAQ covers the “Modules Python Decimals” exercise from the lesson “Modules: Python”.

Paths and Courses
This exercise can be found in the following Codecademy content:

Computer Science

FAQs on the exercise Modules Python Decimals

Join the Discussion. Help a fellow learner on their journey.

Ask or answer a question about this exercise by clicking reply (reply) below!

Agree with a comment or answer? Like (like) to up-vote the contribution!

Need broader help or resources? Head here.

Looking for motivation to keep learning? Join our wider discussions.

Learn more about how to use this guide.

Found a bug? Report it!

Have a question about your account or billing? Reach out to our customer support team!

None of the above? Find out where to ask other questions here!


The solution is:

three_decimal_points = Decimal(‘0.2’) + Decimal(‘0.69’)
four_decimal_points = Decimal(‘0.53’) * Decimal(‘0.65’)

I didn’t get the point here, and the solution gives two decimals on three_decimal_points!

Where in the solution it says to the program the number of decimals?


Yeah I got the same result as brugerf:

three_decimal_points = Decimal('0.2') + Decimal('0.69')

The above code only gives a result with 2 decimal points despite the exercise saying it should give 3 decimal points.


The bug has been reported but will invite a team member to examine this topic.


Which part of the code determines how many decimal points there will be?


There is nothing in the instructions or description about there being any way to control it. Reporting as a bug.

This whole section is a mess.