You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/thebeginning.rst
+10-6Lines changed: 10 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,9 +8,9 @@ Let's look at our first code, hello world. Because Python is an interpreted
8
8
language, you can write the code into the Python interpreter directly or you
9
9
can write the code in a file and then run the file. In this topic, we will
10
10
first write the code using the interpreter, after starting Python in the
11
-
command prompt (shell or terminal). In case you are new to Linux command line,
12
-
+then you can read learn about various command from `this
13
-
book <https://lym.readthedocs.io/en/latest/>`_
11
+
command prompt (shell or terminal). If you are new to Linux command line,
12
+
you can read about Linux commands in `this
13
+
book <https://lym.readthedocs.io/en/latest/>`.
14
14
15
15
16
16
The following is from Fedora 32 machine.
@@ -37,20 +37,24 @@ In our first code we are going to print "Hello World!" using the interpreter. To
37
37
Using a source file
38
38
=====================
39
39
40
-
As a serious programmer, you might want to write the above code into a source file. Use any text editor you like to create the file called helloworld.py. I used vi. You can even use GUI based tools like Kate or gedit. Enter the following text:
40
+
As a serious programmer, you might want to write the above code into a source file. Use any text editor you like to create the file called helloworld.py. I used vi. You can even use GUI based tools like `Kate <https://kate-editor.org/get-it/>` or `gedit <https://wiki.gnome.org/Apps/Gedit>`.
41
+
42
+
Open a shell or terinal and perform these steps.
43
+
44
+
1. Enter the following text:
41
45
42
46
::
43
47
44
48
#!/usr/bin/env python3
45
49
print("Hello World!")
46
50
47
-
To run the code first you have to make the file executable. In GNU/Linux you can do this by typing the following command in a shell or terminal:
51
+
2. Type the following command to make the file executable:
0 commit comments