1. Intro + Math
The beginning of a no-knowledge-required series in which we build a full-stack web application.
This begins a multi-part series in which I walk you through the process of building a full stack web app. I'm assuming you come in with no programming knowledge. All I require is that you have the ability to do long division. If your math skills are such that you can do long division, you should be fine.
Setup
Please go to replit.com and sign up for a free account.
Once you're in the sidebar hit "Explore more" than "Developer Frameworks."

On that page you should see a Python option. Hit that, hit Remix, and then hit Use Framework.
You'll land on a page like this:

Drag the divider between the agent and the console such that the agent disappears. Then in the top right hit the button there such that you see a files tree appear. Then I want you to open up the main.py file.

On the left we have the main.py file. main is the most common word used as the entry point for our program in any programming language.
The console on the right is where the results of our program will be printed out. In later steps we'll add a proper UI like you're familiar with when interacting with software. But to begin with we're going to have an output to the console.
Down to Business
In main.py, enter 1 + 1 and hit the play button. Nothing will happen. The code ran, but we didn't instruct the program to output anything.
Now try:
print(1 + 1)After hitting the play button, you should see 2.
Try all your favorite math operators:
print(1 + 1)
print(2 - 1)
print(2 * 2)As you're familiar with, math can get more complicated. Add another line:
print(4 / 2)That will print out 2.0. Why do we get a decimal with 4 / 2 but not the other operations? When you add, subtract, or multiply two whole numbers together, you will always get a whole number. When dividing, we sometimes get a number with a decimal. Predictability is key in programming, so Python always outputs a number with a decimal. We call these floating point numbers, or floats.
You can check the type of the output in Python:
print(type(1))
print(type(1 + 1))
print(type(2.0))
print(type(2.5))
print(type(4 / 2))
print(type(5 / 2))I mentioned long division previously. Long division gives you two results:
- The number of times your denominator goes into your numerator
- How much remains
For example, if we divide 146 by 12, 12 goes into 146 12 times with 2 remaining. How do we show this in Python?
print(146 / 12) # This the exact result
print(146 // 12) # Note the // vs /.
print(146 % 2) # This is the modulo operator. It returns the remainder.# is ignored. This is called a comment.Python respects BEDMAS like normal math:
print(1 + 2 * 3)
print((1 + 2) * 3)We can also do equality and inequality operations:
print(1 == 1)
print(1 != 1)
print(1 > 1)
print(1 < 1)
print(1 >= 1)
print(1 <= 1)
print(2 >= 1)In the next post, we'll discuss other things we can print.
Justin Barber