0s to become a coder then?
Folks who were programming in the 1940s had no other choice but to program in
0s. But luckily, we use Python in this course. Python is a high-level programming language that allows us to write instructions in English like sentences.
Notice that we said English-like sentences because we cannot use plain English for coding yet. That is a topic for another day, though.
Here’s a sample Python code that prints your personality traits based on your favorite color. You can see that it reads like English.
# This program prints the personality traits based on your fav color. color = input("What's your favorite color?") if color == 'red': print('You are bold and love adventures!') elif color == 'pink': print('You are fun and playful.') elif color == 'blue': print('You are gentle and trustworthy.') elif color == 'purple': print('You are creative and stand out from the pack.') elif color == 'black': print('You are strong and command a sense of respect.') elif color == 'white': print('You are calm and peaceful.') else: print('Sorry, I am having difficulties reading that color.')
There are over 200 high-level programming languages you can use to write your code, but Python is very beginner-friendly and our favorite.
0s, but Python code is English like. Won’t the processor go bonkers? What am I missing here?
Yes, the missing piece is the Python Interpreter, a program that translates the English like Python code to
0s that the processor understands.
We take the help of the interpreter to convert our Python code to the language of the processor.