DEV Community

Cover image for Python 101: Your Complete Beginner's Guide from Setup to Running Programs Introduction
Erick Mweri
Erick Mweri

Posted on

Python 101: Your Complete Beginner's Guide from Setup to Running Programs Introduction

When we began learning python, we began by defining what python is. Python is a programming language. A programming language is a way of giving instructions to a computer and you can use it for many things, such as data analysis, building websites and automating tasks.
All the code and screenshots in this article are in my GitHub repository: [git@github.com:Erickngatia/python-101-beginners-guide.git].

step 1: installing python

First, we did to put Python on your computer. we used microsoft store to download the python version 3.13, also we did install other another editor called vs code ,Jupyter notebook and google colab .

step 2: checking if python is installed

We checked that our if our python was installed by using command prompt(cmd).
we used code python -- version to see the version we had installed on our computer

step 3:Create your project folder

Good habits start early. Keep each project in its own folder.
1.Create a new folder on your desktop called python-101.
2.In VS Code, click File, then Open Folder, and choose python-101.
3.Click the "New File" icon and name your file code python.ipynd. since I am using vs code editor.

Step 4: Write and run your first program

This was the first code we typed, print("Hello, World!")
You just wrote and ran a Python program. Everything else is built on this same idea: you write instructions, and the computer follows them.

Step 5: Variables, the way programs remember things

A variable is a name that stores a piece of information. Think of it as a labelled box. this a screenshot of what was said about valuables

Replace the details with your own. Python has several basic types of data:

String (str): text, written inside quotes, like "Erick".
1.(int): whole numbers, like 28.
2.Float (float): numbers with decimals, like 1.75.
3.Boolean (bool): either True or False.
You can check a type with the type() function:
In variables we also learnt ;

  1. Rules of naming identifiers 2.Reassigning a variable

3.multiple assignment

4swapping values

5.Typecasting

6.Concatination

step 6:Input and Output

Here we said that print() shows result and input() collect value from the user.

#######steps 6: operators

  1. Arithmetic operators Python works as a calculator.

## Finally

We covered on slicing indexing and strings and we did a practice question

Top comments (0)