Fundamentals of Programming Languages
To help myself make edits much
easier I changed the overall line up of how I organized different functions. I
started by listing my containers and assigned them to a value, list, or string.
I copy pasted my option used for input and instead this time used a try,
except, return to filter code. I really got a lot of help using
this site : https://www.w3schools.com/python/python_try_except.asp in addition to I took taking a few
tips out of chapters 9’s sections 1 & 2. This turned out to work smoothly
with my print functions for inputs used in the “options” menu. I needed to
clean up my space in the “Run” environment, so I took note from our recent
discussion on clearing IDLE and remembers using “cls” and ‘\n’ assigned
together allowed us to make more space. After spending time going through
chapter 7, I had a better understanding of setting up lists and restructured my
“All Employees” view. I applied some spacing to clean things up along with an if,
else loop that was based on the range starting from 0. I then used
string formatting to help clean up the printed results. I continue to mix in for,
if, else and try except filter exception functions to help bounce
the user back to each menu by either typing MENU in all caps or ADD in some
examples in which I repeated the code. In order for the entire process to
complete I needed to create a loop option at the end that would allow the
process to start over so I utilize a while and if loop which took several attempts, so I found a
mode function example on w3schools and this worked by linking them to
the inputs 1 -4. I spent several days trying to setup the same results using
some of the more advanced string format methods but gave up and took what I
understood and moved on to handling exceptions instead. It’s fascinating how
different approaches get the have outcome or similar.
Comments
Post a Comment