90 Days of Code: Snake Eyes
--
What’s up beautiful people,
It’s day 11. Previously I talked about receiving a LinkedIn Skills Badge for HTML. Since then, I have come to obtain a pretty good understanding of HTML and its function. So, I started to research different languages to pick up and see what they are primarily used for. My research led me to Python and I must say, it’s one of the visibly easier languages I’ve come across. I don’t know much about it yet, and I don’t know what exactly I’m looking to build with it. However, here are some raw notes from my programming lesson today.
Chapter 1: Basics of programming
All programs use basic instructions as building blocks. Here are a few
of the most common ones, in English:
- “Do this; then do that.”
- “If this condition is true, perform this action; otherwise, do that action.”
- “Do this action that number of times.”
- “Keep doing that until this condition is true.”
What is Python?
2 + 2 = 4 >> this is an expression, which is the most basic kind of programming instruction in Python.
- Expressions consist of values and operators and they can always evaluate down to a single value.
- Data Type — a category for values. Every value belongs to a data type.
Integers — 1, 2, 3, 4, 5
Floating-point Numbers — 1.0, 2.0, 3.0, 4.0, 5.0
Strings — ‘a’, ‘ab’, ‘abc’ ‘Hello World’
- Strings can be blank
- String Concatenation = ‘Alice’ + ‘Bob’ = AliceBob
- String Replication = ‘Alice’ * 3 = AliceAliceAlice
Storing Values in Variables
Variable- a place in the computer’s memory where you can store a single value.
- Values are stored in variables with an assignment statement.
- Ex. cameronAge = 23
>>>cameronAge
23