Changes

Jump to: navigation, search

OPS435 Python Lab 4

10 bytes removed, 23:44, 19 June 2017
PART 3 - String Formatting Expanded
:'''Perform the Following Steps'''
:#Start the ipython3 shell<source>
ipython3
</source>
print_with_borders()
</source>
:'''Create a Script Demonstrating Formatting Strings'''::'''Perform the Following Instructions:''':::#Create the '''~/ops435/lab4/lab4e.py''' script. The purpose of this script is to demonstrate formatting string output from a large data structure.:::#Use the following template to get started:<source>
#!/usr/bin/env python3
# Formatted Strings
:::*The values printed are center aligned by 20 characters
:::*The output must match the sample output EXACTLY if one character is off it will be wrong
::::'''Sample Run 1:'''<source>
run lab4e.py
|-------------Seneca College-------------|
|----------------------------------------|
</source>
::::'''Sample Run 2(with import):'''<source>
import lab4e
dict_york = {'Address': '70 The Pond Rd', 'City': 'Toronto', 'Country': 'Canada', 'Postal Code': 'M3J3M6', 'Province': 'ON'}
|----------------------------------------|
</source>
:::3. Exit the ipython3 shell, download the checking script and check your work. Enter the following commands from the bash shell.<source>
cd ~/ops435/lab4/
pwd #confirm that you are in the right directory
python3 ./CheckLab4.py -f -v lab4e
</source>
:::4. Before proceeding, make certain that you identify any and all errors in lab4e.py. When the checking script tells you everything is OK before proceeding to the next step.
<br><br>
 
= LAB 4 SIGN-OFF (SHOW INSTRUCTOR) =
198
edits

Navigation menu