This is a repository of simple Python programs for beginners that is expected to be run using Python's IDLE IDE.
-
In order for a student to make use of this Python IDLE beginners program repo, it is expected that the student has already installed latest version of Python 3 on their machine.
-
Students are also expected to have already installed Python IDLE IDE on their machine.
At the end of completing these set of programs, we hope that students will have basic understanding of how to execute Python commands on a Python shell, particularly on Python IDLE IDE.
Learn how to use a Python IDLE interpreter. Also verifies that your Python and IDLE interpreter is installed properly.
-
Open up the IDLE application, You can find the application by typing in the name of the program in your Operating System's search bar.
-
Enter a valid number, say for example 4
Python 3.5.2 (default, Nov 12 2018, 13:43:14) [GCC 5.4.0 20160609] on linux Type "copyright", "credits" or "license()" for more information. >>> 4 4 >>>
You should see the Python IDLE interpreter printing back the value 4 as shown above.
Learn how to use a Python IDLE interpreter to add numbers.
-
Open up the IDLE application, You can find the application by typing in the name of the program in your Operating System's search bar.
-
Enter the following expression in your Python IDLE interpreter
Python 3.5.2 (default, Nov 12 2018, 13:43:14) [GCC 5.4.0 20160609] on linux Type "copyright", "credits" or "license()" for more information. >>> 2 + 4 6 >>>
Python expressions are a form of evaluations that when done results in a final value that can be printed on the screen. In this case, the line 2 + 4 is an expression that when evaluated by the Python interpreter results in a final value 6 that can be printed on the screen as shown above.
Learn more about Python Expressions
You should see the Python IDLE interpreter printing back the value 6 as shown above.