Skip to content

Latest commit

 

History

History
39 lines (28 loc) · 760 Bytes

File metadata and controls

39 lines (28 loc) · 760 Bytes

2.5 - Running Programs

Lets create and run a very small python program

#c5f015 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
  1. Put this simple python program into hello.py
print "Hello, im a python program"
  1. Run hello.py
pwd
cd ~/Development/assignments
python hello.py

#f03c15 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)
  1. Run this program