FAQ: Data Types - Putting it All Together

This community-built FAQ covers the “Putting it All Together” exercise from the lesson “Data Types”.

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

Learn How To Code

FAQs on the exercise Putting it All Together

There are currently no frequently asked questions associated with this exercise – that’s where you come in! You can contribute to this section by offering your own questions, answers, or clarifications on this exercise. Ask or answer a question by clicking reply (reply) below.

If you’ve had an “aha” moment about the concepts, formatting, syntax, or anything else with this exercise, consider sharing those insights! Teaching others and answering their questions is one of the best ways to learn and stay sharp.

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!

1 Like

I typed the number 1 for the variable myNumber which led to an error called “error, Input is not number”. Does anybody know why?

6 Likes

Maybe since the square of 1 is one, this program can’t account for any thing that is itself?

1 Like

Interesting! I got the same result with 0. Non-integers and negative numbers seem to work fine. Reporting bug…

3 Likes

Could it be something to do with 1 and 0 being ways of referring to true and false?

4 Likes

For mybool = , i changed the value from true to “1”, and it gives me an error - input is not a boolean. why does it only work with true or false. 1 or 0 can also be a boolean input.

1 Like

Well wtf are you supposed to type in the “putting all together” part? It all made sense until then. I guess I know why I don’t code. Why go from explicit instructions, to basically no instructions. fna

1 Like

The reason you get an error message is because there should only be quotation marks for the second variable, the string. A number does not have marks nor a boolean.

I don’t understand how to do this exercise can anyone help me?

1 Like

Transmit button isn’t working. What is wrong? As far as I understand, what I was supposed to do is choose “square” from the drop down menu, and press Transmit!. But even though transmit appears as a button in HTML, the code is wrong and when I fix it it doesn’t want to respond and loses the layout. What is happening?

1 Like

As of today, when changing the myNumber variable to 1, the function remains unable to square it.

2 Likes

What do you mean by,“What happens if you swap out the data type?”
-what will I swap?
-how will I swap?

7 Likes

Are boolean values always case sensitive? It would error out if I type in False but would work if I typed in false

1 Like

What does this exercise what me to do? (ex: Step 1. Step 2. Step 3.) What does the ‘transmit’ button do? There is no mention of this anywhere in the ‘directions’ I type in anything different and it doesn’t do anything or makes errors. What are the instructions saying? Call function? Change what?None of this is in my notes and I just reviewed the entire chapter AGAIN. I Looked these things up on google and they look NOTHING like what is in this exercise…this is really confusing.

I don’t know why these lessons are set up this way but it’s really discouraging and defeating after trying so hard to learn something that is already so complicated.

i dont understand what this exrecis try to tech us ?

1 Like

so im guessing you cant square 1 you have to try other numbers

I tried other numbers but it doesn’t do anything. I don’t even know what this exercise wants me to do. This is so frustrating.

Hello there!

This exercise lets you play around with different variable values and functions so that you can get a better grasp of data types. First, run the code as is. Then, you can play around with the interactive area on the right, selecting different functions from the dropdown and clicking the “Transmit!” button. You will see the result of each function displayed on the image of the computer screen in the interactive area on the right.

The exercise also asks you to try changing the values of myNumber, myString, and myBool to see how different values could affect how the functions run. The same goes for data types; you can change the data types of the variables to see how the functions are affected. After making changes, simply press Run again and play around with the interactive area on the right.

7 Likes

Thank you, These are helpful. I wish the lessons had instructions this clear, most people are smarter than me so maybe it’s not important. I’ll try these with the excercise.

Why has the bug where if the number is set to 1 an error results not been fixed after so long? It’s discouraging to new learners who wouldn’t understand that it’s a bug in the program.