In this blog post I will discuss my first impression of the online course ‘An Introduction to Interactive Programming in Python’ and my experience the first two weeks in the course. In week one I became familiar with the course site and learned about CodeSkulptor (website where we write and implement Python code), comments, print, arithmetic operators, operator precedence, variables, and how to submit, save, and export code in CodeSkulptor. I have included a sample of some of my notes for week one at the end of this post. While optional, I completed the mini-project for week one titled “We want a shrubbery! …”. This project involved creating a program in CodeSkulptor that prints out the phrase “We want… a shrubbery!”. My primary motivation for completing the project was to become comfortable with the logistics of the submission and peer assessment process. In week two I learned about functions, visualizing functions, additional operations (modular arithmetic, data conversion, and comparison), Python modules, logic, and conditionals. I have included a sample of some of my notes for week two below. The mini-project for week two was titled “Rock-paper-scissors-lizard-Spock” and involved the creation of a program that displayed five player choices (i.e. rock, paper, scissors, lizard, and Spock) with five randomly selected ‘computer’ choices, computed a winner, and displayed this winner to the user. This involved the creation of functions to convert choices into numbers and vice versa for computing a winner and displaying selections. Computing a winner and displaying selections took place in a different function that made use of random.randrange() to determine random computer choices and if/elif/else statements to determine the winner. The rules of Rock-paper-scissors-lizard-Spock are:
While it is too early to fully evaluate this course and the accompanying learning process, I believe this course has so far been effectively set-up and delivered to suggest those taking it will have an effective and enjoyable experience learning Python. Some observations that contributed to this assertion include:
- Familiarity breeds habit.
- Marking mini-projects reduces the workload of professors. This seems especially beneficial as this course is provided free. - Marking the work of others fosters those connections between students that may be less prevalent in online courses.
Overall I have had a very positive experience the first two weeks of class and my impression of MOOCs (Massive Open Online Courses) has definitely been improved as a result. If this course is a good representative of MOOCs, then I think MOOCs stand a good chance of altering postsecondary learning and easing the process of lifelong learning for the better. Thanks for taking the time to read my post. If you have any questions, comments, or suggestions please share them below. Week 1 Note Sample Arithmetic Operators + plus addition - minus subtraction * times multiplication / divided by division ** power exponentiation Operator precedence – “please excuse my dear aunt sallie” = (), **, *, /, +, - Always manually group using parentheses when in doubt. Variables = Placeholders for important values.
Assign to variable name using single equal sign (=).
Week 2 Note Sample
Functions Function = Piece of code that you define that you can execute later. You only execute the code inside a function when you call a function. You can call a function more than once. Basic Function Form Def function(variable(s)): equation return output Note: Inside a function you can call another function. Visualizing Functions using Viz Mode in CodeSkulptor Viz mode records a trace (sequence of statements) of the execution of your program. When a particular statement is highlighted in this trace using the navigation buttons the contents of the console (upper right) and the state diagram (lower right) corresponds to the state of your program prior to execution of the highlighted statement. Modules Python Modules = Extra functions implemented outside basic Python. import simplegui # Access to drawing operations for interactive applications. import math # Access to standard math functions, e.g. trig import random # Functions to generate random numbers. Randomly Select Element in Range: random.randrange() In Python the statement ‘import’ is used to load a module. More Operations Remainder – Modular Arithmetic a % b % computes the remainder of one number with respect to another. Note: The % operator has a higher precedence than the + operator. Operator ‘str’ converts something into a string. Logic and Comparisons Boolean Logic = Logic where all values can either be true or false. No grey area. Not X = Value is opposite of X. And = If both values are True, then together they are True. If any value is False, then together they are False. Or = If both values are False, then together they are False. If any value is True, then together they are True. Comparison Operators > = Greater Than < = Less Than >= = Greater Than or Equal To <= = Less Than or Equal To == = Equal To != = Not Equal To Allows you to take two values, compare them to each other, and generate a Boolean. Conditionals if x: code here The above functions such that if x is true, then the following indented code will be implemented. if x: else: If the predicate x is true, then indented code after ‘if x:’ will be executed and if it is not true, then the indented code after ‘else:’ will be executed. elif y: Means else if: If ‘if’ was false, but ‘elif:’ is true, then indented code after ‘elif:’ will be executed.
0 Comments
Since beginning my digitization project I have scanned, organized, and stored a decent amount of material. However, I still have a great deal of material to scan. In this post I will share my experience so far.
Before starting to scan material I set up a scanning area to ensure optimal scan quality. For my initial set-up I used an old fluorescent desk lamp for lighting and a dark blue tablecloth as a background. The tablecloth was for contrast and to make it easier to determine the edges of materials to be scanned. At first I had difficulty getting the fluorescent desk lamp to work, but after I got it to work it gave off a lot of light and I was able to produce great scans. About an hour or two after I started scanning the lamp went out. I fiddled with the lamp for a bit, but I was unsuccessful at getting it to work again. This led me to seek out alternative light sources. As I did not have any more fluorescent lights, I switched to a gold five-bulb incandescent lamp instead. After using the incandescent lamp for a couple scans I checked the images and they appeared to be similar in quality to the ones produced with the fluorescent lamp. As a result, I decided to continue using the incandescent lamp for the rest of the project. While scanning I noticed it took a while for some scans to upload to the app on my Macbook Air from my IPod Touch. This delay in uploading increases the time it takes to digitize one article, but this isn’t really that much of an issue in the big picture as one can continue to scan other documents while recently scanned documents upload. While checking and organizing scans on my Macbook Air I noticed some scans were slightly blurred (luckily these were few and far between). As these blurred scans were often the readings (i.e. scanned assigned readings) I was taking pictures of I decided not to take on the onerous task of going back and rescanning all failures. The primary documents I wanted to scan were my notes and the documents I personally wrote. This being said I did go back and rescan some pages that warranted the extra effort (i.e. notes and/or readings I wanted to be sure I had). Those that warranted the extra effort were determined to be as such based on personal preference and how I felt at the time, but notes took a high precedence and I do not believe I failed to go back and rescan any notes when I noticed there was blurring. Readings are a different story as the option is available to locate physical or digital copies due to the great efforts of others in our society. So there have been a couple bumps, but overall my scanning experience has been smooth and fruitful. I plan to write another blog post when I’m finished scanning or if anything changes, but as I have a lot to scan this may take a while. This being said if you have any questions about my digitization project feel free to post them below and I will do my best to respond to them as soon as possible. Cheers! |
Christopher DesrochersModern Day Renaissance Man Categories
All
Archives
April 2024
|