Introduction: Python Basics

About: I am a student and want to be an engineer when I am older. I have made lots of projects from instructables but only recently made an account and published my first project. I like to do a wide range of thing…

This instructable shows you how to do the basics of python.

Supplies

Python IDLE

Step 1: Open Python

Unless you want your code to be carried out line by line and not saved, when you open python you need to open the shell and then click File > New File. This will open a blank python document which you can edit and create big programs in.

Step 2: Comments

Comments are written in hashtags (#) and are not part of the code. The code will just skip past these.

Step 3: Print Statements

Printing something makes it appear on the screen when the code is running. You print writing by typing print("write anything here") alternatively, you could print a variable by typing print(variable name here).

Step 4: Examples of This Code in a Game

This code is from my Mastermind game. Here is the link on how to code it.

https://www.instructables.com/Python-Mastermind-Game/