Changes

Jump to: navigation, search

OPS435 Online Lab1

1,160 bytes added, 01:36, 12 May 2020
no edit summary
==== Create subdirectories for labs and assignments====
:* Lets setup and reserve the following directories for storing and organizing files for labs and assignments. Please store your lab scripts and files. Execute the following commands at the command prompt:
<pre>
mkdir ~/ops435/lab2
mkdir ~/ops435/lab3
mkdir ~/ops435/lab4
mkdir ~/ops435/lab5
mkdir ~/ops435/lab6
mkdir ~/ops435/lab7
mkdir ~/ops435/lab8
mkdir ~/ops435/a1
mkdir ~/ops435/a2
</pre>
== Task 2 - Testing your setup ==
:* Download Checking the sample.py script from https://github.com/rayfreeping/ops435-lab1 repository to ~/ops435/lab1 directory:* Study and Explore the sample.py python script and identify the following sections::** the shebang line:** the script level doctstring:** the import section to import functions from the standard library module:* Exploring * the function definition section:** the main script section:* Also identify the following items applear in the sample .py script::** the Python keywords:** the decision code segement:** the looping code segment:** the run time error (exception) handing code segment:* Running the sample scriptand study its output::** <source>python3 sample.py</source>:** <source>python3 sample.py test</source>:** <source>python3 sample.py 2>/dev/null</source>:** <source>python3 sample.py test 2>/dev/null </source> 
== Task 3 - exploring Python's built-in functions ==
:* print() function
1,758
edits

Navigation menu