modules

2.5 - Running Programs

Lets create and run a very small python program

❇️ Example

  1. Create and “assignments” folder, navigate to it, and create an empty file called hello.py

     cd ~/Development
     mkdir assignments
     cd assignmets
     touch hello.py
    
  2. Put this simple python program into hello.py

     print("Hello, im a python program")
    
  3. Run hello.py

     python3 hello.py
    

➡️ Try It

  1. In your assignments folder, create a new python program called “aplusb.py”

     a = 5
     b = 7
     print("The sum of a and b is" + str(a + b))
    
  2. Run this program