Changes

Jump to navigation Jump to search

Workshop: Introduction to programming (with Python)

8 bytes removed, 20:29, 3 October 2019
Python
{{Workshop header}}
=== Python ===
Some Beginner Questions:
* What do you know about Python?* Do you have any previous experience with Python or other programming languages?
Python Basics:
* Python is a flexible, high-level, procedural scripting language. * It offers support for object-oriented programming and integrating libraries.* It's super widely adopted!
<br />
#'''Open a text editor''' - This is where we will be writing all of our code. There are many different editors you can use, so feel free to choose the one you are most comfortable with. The only requirement is that the text editor should be able to product plain text files. Windows users already have Notepad installed. Mac users have TextEdit (other text editors include TextWrangler, Atom, and much more).
#'''Write your code''' - To make this program as straightforward as possible we will simply write a print statement. After writing your print statement save the file to your Desktop (or whatever other directory you want) as "hello'''.py'''". All python files need to have the extension .py
#[[File:Hello World Executed.png|thumb|Execute the code!]]'''Execute the code''' - Now is the fun part, running the code! Open up the command prompt (Terminal for Mac Users, Powershell for Windows). Navigate to the directory where you saved the file (ex: cd Desktop). Now execute your python code by typing "python [filename]" [[File:Hello World Executed.png|thumb|Execute the code!]]<br />
118
edits

Navigation menu