FAQ: Learn Python: Syntax - Numbers

This community-built FAQ covers the “Numbers” exercise from the lesson “Learn Python: Syntax”.

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

Computer Science
Data Science

FAQs on the exercise Numbers

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!

2 posts were split to a new topic: Why don’t I need paranthesis are around numbers?

2 posts were split to a new topic: Why don’t I need to define my variable as a float or integer?

6 posts were split to a new topic: I’m stuck on the numbers exercise?

2 posts were split to a new topic: Shouldn’t runtime be a float instead of an integer?

3 posts were split to a new topic: Can I have the solution?

Why do you need to define release_year?
If i just type “release_year_int = 2012”. This should be enough to know the number 2012 is about the release year. I could say like “print(release_year_int)” and the message would show “2012”.
What am I missing, why make it so extensive by writing another line?


Hi folks,

Having some trouble with this exercise. How do I define rating_out_of_ten?

By simply declaring it…

rating_out_of_ten = 9.5

I’m here to help, so during the exercise I was kind of lost but then if we think we are talking with a machine and the machine follows certain protocol you can think of trying answering in the order the machine is asking, after multiple attempts I decided to reply in this way.

wrong answer :x:
runtime = 20
release_year = 2020

correct answer :white_check_mark:
release_year = 2020
runtime = 20

wrong answer :x:
rating_out_of_ten = 7.5

correct answer :white_check_mark:
rating_out_of_10 = 7.5