Jump to: navigation, search

OPS435 Python Lab 1

499 bytes added, 9 May
:In advance of this lab, you will install a current distribution of Linux to be used as in a host machineVirtual Machine on your external SSD. You will NOT be required to setup Virtual Machines for do all of your future work within this lab VM (that will be covered in a future labincluding quizzes!). You will then setup your Python scripting environment on your host machine, including the setup the of '''python''' libraries and also the setup of a user-friendly interactive Python environment called '''ipython'''. You will also install additional framework tools (such as '''git''', '''vim''', and '''tmux''') to be used in later labs.
:After selecting an appropriate text editor to use, then you will start to create '''Python''' scripts to learn basic operations such as: '''printing text''', '''using objects''', and performing '''math operations'''.
:::*Download outside Seneca College:
::*'''Disk space:''' 50GB
::*'''CPUs:''' 4(Number of processors: 1, Number of cores per processor: 4)
::*'''Internal Memory:''' 8GB
::*'''Environment:''' GNOME Desktop
<!--==== Environment Setup ====
:'''Perform the following steps:'''
:#Regardless of the Linux distribution that is used for this course, these lab will be using and referring to the current version of '''Centos7CentOS 7''' (Graphical Desktop) for our main Linux machine. When creating your VM, refer to the '''Details / Minimum Requirements''' section above for assistance. :#Install Centos7 CentOS 7 VM selecting the default partitions. When you have finished the installation of Centos7CentOS 7, you may proceed to the next step.
<blockquote style="margin-left:35px;">{{Admon/important|style="padding-left:25px"|Unit Feedback Scripts|Each '''Part''' (within an 'Investigation) is referred to as a '''Unit'''. Each Unit will require that the student download and run a '''Unit Feedback Script''', which provides the OPS435 student "real-time feedback" of their completed work.<br>This feedback is not considered to be perfect or fool-proof; however, it may provide feedback (hints) in case a student gets stuck or experiences an error when performing administration tasks or when creating their Python scripts. These unit feedback scripts can also be used to confirm that the student's Python script is on the right track, and provide a consistent record of their Python scripting progress throughout their labs.}}</blockquote>
yum install python34 python34-devel # Install python3.4 and python3.4 development libraries
yum install python python2-devel # Install python2.7 and python2.7 development libraries
:#We now need to create a link to python3.4:<source lang="bash">
cd /bin
ln -s python3.4 python3
:#Next, you will install a couple of useful applications called '''tmux''' and '''screen'''. They are referred to as '''terminal multiplexers'''. If you plan to spend a lot of time in the terminal, this powerful tool will help you get it done. Lets install it and plan to use it later:<source lang="bash">
yum install python-pip # Install python2.7 pip
yum install python34-pip # Install python3.4 pip
<li style="margin-left:25px;">Upgrade python34-pip with the following command:<source lang="bash">
pip3.4 install --upgrade pip
<li style="margin-left:25px;">Issue the following command to install '''git''':<source lang="bash">
:'''Perform the following steps:'''
:#Make sure you're using your regular user login and not using the root user for the following section.
:#To access the '''ipython''' shell, issue the following command:<source>
:'''Be able to answer any questions about the lab to show that you understood it!'''
<br>:'''For sections A & B:''' ::<brspan style=color:green;font-size:1.5em;">&#x2713;</span> Submit your output and Python scrips via Blackboard instead.

Navigation menu