Changes

Jump to: navigation, search

OPS435 Python Lab 1

13 bytes added, 11:01, 8 March 2017
no edit summary
Before moving on to the next step make sure you identify any and all errors in "lab1a.py". When the check script tells you everything is "ok", you may procede to the next step.
= Investigation INVESTIGATION 3 - Writing a Python Script : WRITING A PYTHON SCRIPT =
During this investigation we will start writing our very first python scripts. These will be very basic and help us practice syntax and foundational skills, such as: outputing text to the screen, storing data inside variables, and using math operators.
=== Part 1 - Printing ===
Lets start IPython interpreter and start writing some python code.
=== Part 2 - Hello World ===
Next, we will make our first script with the above function. Open a new text file called "lab1a.py".
Before moving on to the next step make sure you identify any and all errors in "lab1a.py". When the check script tells you everything is "ok", you may proceed to the next step.
=== Part 3 - Variables ===
A variable is used to store data for use later in the program. This data can be a string, integer, decimal, etc.
==== Part 3 - strings ====
First make a new variable containing a value.
Before moving on to the next step make sure you identify any and all errors in "lab1a.py". When the check script tells you everything is "ok", you may procede to the next step.
=== Part 4 - Integers ===
Lets enter into IPython to test out variables.
Try the check script as you are working through a script to sometimes get hints.
==== Part 4 - Lab Check lab1c ====
This course is designed with a unit testing suite, which can be used to look at the scripts you write and give real-time feedback. This feedback is not perfect, however it may offer some hints if you get stuck with a error. It can also be used to make sure you are on the write track, and show progress.
=== Part 5 - Math Operators ===
Python has a number of math operators you can use in your programs.
13,420
edits

Navigation menu