Python is a powerful, easy to user, object oriented programming language.
It’s performant meaning it runs on all operating systems and it’s extremely versatile.
Python’s versatility; scripts & programs, web development, data science
- Command line calculators
- UI to create desktop apps
- Server side language
- Full stack apps or REST APIs
- Frameworks like Django and Flask
- Gather, import and clean data
- Machine Learning
Python has a clean and simple syntax. Has a “batteries included” approach and offers great documentation.
Python embraces objects, classes, inheritance and allows you to easily work with complex data structures.
Download package https://www.python.org/downloads/
Launch terminal then run: “python”.
Now you’re in the terminal REPL.
In terminal run: “2+2”
run: user_name = input(‘Please enter your name: ‘)
To exit the REPL run “exit()”.
Read From A File
Create a directory in an easily accessible folder. Create a file called mypythonscript.py
print "My Python Script"
In terminal run “python mypythonscript.py”.
Your First Function
Add this to your mypythonscript.py, and run it.
def greet(name, age):
print('My name is ' + name + ', I am ' + age)
Your output should look like this: