The code for Binary to Base 10 in Python was a little more straightforward than Scratch.
Using coding concepts to teach middle school math and programming. I focus primarily on coding with Scratch and Python.
Saturday, January 14, 2017
Binary to Base 10 with Python
Python has a unique syntax for exponents: Instead of the standard 3^2 representing 3 to the second power, Python uses 3**2. It makes sense. I guess. In a weird sort of way. Of course, if no one told you, you might spend a while troubleshooting your code thinking the only thing that couldn't POSSIBLY be wrong is 3^2=9. But....in the python world, 3**2 is 9.
The code for Binary to Base 10 in Python was a little more straightforward than Scratch.
The code for Binary to Base 10 in Python was a little more straightforward than Scratch.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment