Understanding Variables and Data Types - How Do the type() and isinstance() Functions Work?

Tell us what’s happening:

Question 3:- account_balance = 12
isinstance(account_balance, (int, float))

for this queestion if you try to run in it in python it doens’t give any output
Here’s a proper way to do it
account_balance = 12
print(isinstance(account_balance, (int, float)))

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/156.0.0.0 Safari/537.36

Challenge Information:

Understanding Variables and Data Types - How Do the type() and isinstance() Functions Work?

GitHub Link: freeCodeCamp/curriculum/challenges/english/blocks/lecture-understanding-variables-and-data-types/6a03f5d143c8688a9265c0a0.md at main · freeCodeCamp/freeCodeCamp · GitHub

Welcome to the forum @diab1o

What will be returned in this use of the isinstance() function?

The question is asking about the return value of the function call.

You could use the print function to output a value to the console.

You could also use the isinstance function in an if statement to handle various situations, like do something if the value is an integer, do something if the value is a float, or display a message if the value is not a number.

I think there are already a quite a few examples of the print function.

Happy coding