Changes

Jump to: navigation, search

OPS435 Python Lab 2

1 byte added, 02:29, 25 May 2017
Storing User Input In Variables
''' Practice Storing User Input '''
:#Now it's time to create a new script. Make a copy of '''lab2a.py''' and call it '''lab2b.py'''. Now modify '''lab2b.py''' so that it asks the user for both the value of name and the value of age. Use the input() function and store the values in the correct variables. Example output is shown below:
::*The script should have a Shebang line
Hi Jen, you are 25 years old.
</source>
::82. Download the check script and check your work. Enter the following commands from the bash shell.<source>
cd ~/ops435/lab2/
pwd #confirm that you are in the right directory
python3 ./CheckLab2.py -f -v lab2b
</source>
::93. Before proceeding, make certain that you identify any and all errors in "lab2b.py". When the check script tells you everything is "ok", you may procede to the next step.
== PART 2 - ARGUMENTS ==
198
edits

Navigation menu