Coding w/ Python Part 1- How to Start
Python is one of the best coding languages for beginners because of simplified commands. To start we need to look at the parts of code that get used. Here’s how to get started.
Installing Python and Pycharm
To install python go to there website and install 3.8.3. Follow the instructions after downloading the installer. Pycharm is where you use python at a separate link here.
Why you should use python?
Python is a beginner-friendly programming language that a lot of large companies are using.
Variables, Strings, numbers, phrases:
Variables
These are the objects that you have to utilize to make anything a usable item.
Character_name = ____, x=3.14
Whenever you put that variable into a command it replaces an item
Strings
Strings are what allow you to submit an item multiple times throughout your code. This is one of the most powerful things that you can use. Additionally, you have to put str(__) when you add it to a phrase in order for the code to go through.
my_numb= 5
print(str(my_numb) + “my favorite number”)
Numbers
You can spit out numbers and mathematical formulas. The print() command puts out what's inside the parenthesis. You can also do more complex math f(x)’s.
print(5)
print(3 * 5)
print(3 % 10)= 1
Phrases
The phrase() command sets up a line of code.
phrase= “Welcome to Medium”
You can also pick out a specific part of the phrase such as the W. You use square brackets to insert the placement of the letter starting at 0.
print(phrase[0])
The replacement command can also replace a part of the phrase.
print(phrase.replace(“Medium”, “the internet”)) = Welcome to the internet
Coding can be pretty overwhelming when you first start. The movies show these giant pages of code with three monitors. Really, some lines with a few commands that get the job done. When it comes to coding eating the whole elephant at once is the wrong way of looking at it. If you break it up into elements then you’ll be coding in no time. Down below is a four-hour video that is a free intro to python on youtube.
Reference: