Enough Talk, Let's Get Coding
- Nov 15, 2016
- 1 min read
Python, unlike Java, C++, and many other languages, has very little code overhead. Everything you learn can be immediately used in code. For instance, pop over to https://repl.it/languages/python3 and type the following classic line of code:
print("Hello, World!")
As you would suspect, it outputs simply:
Hello, World!
There's no input and not really any processing here - just output: the computer giving data to the user.
You can also print numbers:
print(10)
print(3.14)
and math expressions:
print(5 + 5)
prints 10 as expected.
HOWEVER,
print(5.0+5.0)
prints 10.0 ... What's up with that?
The short answer: 5 is an integer, 5.0 is a floating point. They have different Type.





Comments