Since Term One, when I was extremely preoccupied with planning things for the Robotics Club, I have in Term Two focused much more on my independent project of learning Python with the aid of Jason Cannon's book "Python Programming for Beginners." Still, my progress has been slow-going, because I often spend a long time on new concepts exploring all the applications in attempting to commit the principle to memory. It also usually takes me a while to fully understand the proper usage of each new function or idea, so I try to write as many programs as possible using new concepts. For instance, in my most recent exploration of function usage, I wrote several versions of a basic body of code, each getting progressively more complex and incorporating more knowledge that I have learned so far.
[caption id="attachment_1897" align="aligncenter" width="481"] Version One of the mad libs program[/caption]
[caption id="attachment_1898" align="aligncenter" width="469"] Version Three (heavily revised) of the mad libs program[/caption]
And, as expected in learning to program and programming itself, it always takes several tries running the programs in Shell to refine the program and to filter out typographical errors: a missing indent, an extra letter or a missing parenthetical pair.
[caption id="attachment_1879" align="aligncenter" width="426"] The first time an outside user tested the program by providing input; however, notice that it says to enter "a" adjective instead of "an", indicating an error in running the first function of the code.[/caption]
[caption id="attachment_1893" align="aligncenter" width="452"] Code with a missing parenthetical pair after the first 'if' statement[/caption]
[caption id="attachment_1894" align="aligncenter" width="460"] Inserted parenthetical pair[/caption]
[caption id="attachment_1895" align="aligncenter" width="439"] Running the program in Shell - from failure to success![/caption]
In the short period of time that has been since Term Two began, my progress in programming Python has picked up in pace significantly, since it has become my main focus. I have learned much about patiently troubleshooting my code, and how meticulous one must be when using functions, booleans, and asking for user input. I hope to finish Cannon's book by the end of T2, and hopefully start more complex programs.
[caption id="attachment_1897" align="aligncenter" width="481"] Version One of the mad libs program[/caption]
[caption id="attachment_1898" align="aligncenter" width="469"] Version Three (heavily revised) of the mad libs program[/caption]
And, as expected in learning to program and programming itself, it always takes several tries running the programs in Shell to refine the program and to filter out typographical errors: a missing indent, an extra letter or a missing parenthetical pair.
[caption id="attachment_1879" align="aligncenter" width="426"] The first time an outside user tested the program by providing input; however, notice that it says to enter "a" adjective instead of "an", indicating an error in running the first function of the code.[/caption]
[caption id="attachment_1893" align="aligncenter" width="452"] Code with a missing parenthetical pair after the first 'if' statement[/caption]
[caption id="attachment_1894" align="aligncenter" width="460"] Inserted parenthetical pair[/caption]
[caption id="attachment_1895" align="aligncenter" width="439"] Running the program in Shell - from failure to success![/caption]
In the short period of time that has been since Term Two began, my progress in programming Python has picked up in pace significantly, since it has become my main focus. I have learned much about patiently troubleshooting my code, and how meticulous one must be when using functions, booleans, and asking for user input. I hope to finish Cannon's book by the end of T2, and hopefully start more complex programs.
Comments
Post a Comment