How do I write the first program in Python? -Beginners Level/Step-by-step guide to help you get started

Writing a code or building a program can be a bit confusing as to where to start from and where to land. In most cases, candidates or individuals end up running away from the entire issue, because of the mathematical features involved.


Meanwhile, I can take you through the simplest method and there you go. Consider the below instructions. This helps you to begin happily and with no issues or troubles.

Step 1

Ensure that Python IDE is installed on your computer, and or make sure to install the CODE EDITOR on your phone in case you do not have a personal computer to write the application.

There are lots of other text editors such as:

• Notepad++

• Sublime Text

• Visual Studio Code – A free application

• IDLE-which comes bundled with Python

• PyCharm

• ……and many others


Step 2

How To Write Your First Program

1. Open the text editor or VSC

2. Type in the first line, thus

Print(“Hello, World!”) as our first example

3. Press the enter key which is optional

4. Save the file by clicking on the file command or button

5. save now

6. Filename. for instance;

Surf.py

7. Ensure clicking on the save button to make sure changes are save practically

Category 3

Running The Program

To run the program, follow the below steps:

1. Click or tap on the 3dots in code editor and choose execute

2. Select the language, example Python (automatically, the compiler will also be activated)

3. Tap run or execute


Result( Hello, World!)


4. If you are running or using IDLE, just press F5 or select the command RUN from the given menu

5. Meanwhile, with those using the text editor, open the terminal or the command prompt

6. Move to the directory where you saved your file and the filename

 

NOTE:

TIPS AND NEXT STEPS

1. Python is indentation-sensitive, so make sure to use the right command and spacing and above all the indentation in your code.
2. Encountering with our print statement, such as the print(“Hello, “ + “World!”) or just apply print(“Hello, { }”.format(“Hello!”))
3. Ensure to learn about the Python basics, such as variables, data types and also the control structures to continue building your skills

About Author


Discover more from SURFCLOUD TECHNOLOGY

Subscribe to get the latest posts sent to your email.

Leave a Reply

Your email address will not be published. Required fields are marked *

Discover more from SURFCLOUD TECHNOLOGY

Subscribe now to keep reading and get access to the full archive.

Continue reading