Basic Programming Course: Summary of the Lessons Learned

Basic Programming Course: Summary of the Lessons Learned

Basic Programming Course mainly aims to prepare students for a future career in programming and related fields by equipping learners with prior programming experiences. The various topics covered during the eight weeks include Introduction to Python 3, Data Types and Variables, Branching, Python Loops, Functions and Strings, Lists/Dictionaries/Classes, Exceptions, and Modules and Modular Programming. Each of the topics corresponds to a single module of the course.

Introduction to Python 3, which is the first of the eight modules, introduced the essential of programming concepts using a dynamic object-oriented programming language called “Python Program.” Some of the ideas that were covered during the week are programming introduction, programming in python, computational thinking, the python interactive interpreter, basic input/output, errors, and computer language history among others.

During the first lesson, we discussed the key concepts that are critical to understanding how the python operates. These include an interactive interpreter (a program that allows the execution of a single a row of text at a time), statement, expressions, print (), and error (syntax, logic, and real-time). Moreover, we discovered in this module that programming accomplishes the basic input and output using the built-in function called print(). On the other hand, to develop codes, the python program uses the Integrated Development Environment (IDE) in which positive and negative voltages are “1” and “0” respectively. The class further discussed computer tour whereby basics functioning of RAM and processor were explained. The module was closed with a discussion on the history of computer language.

The second Module was based on the subject of Data Types and Variables. The discussion in this week revolved around a variety of areas including string basics, lists basics, common data types, dictionary basics, type conversions, numbers in binary, and string formatting. The module was started by reviewing Python Keywords such as and, as, assert, break, class, global, if, import, in, continue, def, del, False, finally, for, from, is, lambda, Noneelif, else, except, nonlocal, not, or, pass, raise, return, True, and try.

Accordingly, the week was a little more thorough than Module1 as we began digging deep into learning how to program using python. We learned about naming conventions (such as the use of ASCII-only identifiers), Integer Division (“floor division” performed by “//” and “true division” performed by “/”), and that modern programming languages use to store process and store textual information. Additionally, the module provided an opportunity for us to learn about “lists” –a kind of mutable “container” to or from which a programmer can remove or add elements. The removal and addition are accomplished using “append()” and “pop()” respectively. The topic ended with a discussion on “Numbers in Binary” in which we learned how to convert numbers from decimal to their binary equivalents. The lessons of week six built upon this module by providing further information on lists and dictionaries and classes covering list methods as well as iteration over lists.

In the third week, we talked about Branching. The module comprised of seven subtopics; If-else statement, Boolean operators (such as “a and b” and “a or b”) and expressions, membership operators, relational and equality operators, multiple if-else, code blocks and indentation, and conditional expressions. Thus, there were much to gain during this week than one could imagine. For example, I learned that a program could be directed to execute either one group of statements or another using “if-else statement” or “else if” (for more than two branches) whereby the “else” part is optional. The module further covered relational equality operators such as a>b and a>=b.

Module four was about Python Loops. The subtopics included while loops and for loops, counting using the range() function, developing programs incrementally, loop else, and break and continue. Essentially, programming is the tool that allows a programmer to execute the same code multiple times based on specified conditions. For example, as long as the loop’s expression is True, a while a “while loop” will continue to execute a block of code. However, f “for loop” loops the elements in a container in turn. On the other hand, some loops appear as a section of another loop. Module four described that such a loop also called “nested loop” is used for generating a combinations items. The number of loops depends on the number of loop “counting” specified by the programmer.

In module five, we learned about functions and strings. The first term, function, are a sequence type in which characters are arranged by position whereby each character is read using a bracket. In this module, we saw that programmers could use slice notation to read multiple string characters. Slices have their last characters in one location before the stated end. A function, on the other hand, is a named string, which when invoked, executes. The python has many built-in functions such as type() and input(). However, it was interesting to discover that unlike other programs that limit programmers to using built-in functions, python gives the program the opportunity to create new functions using the “def” keyword. In addition to a keyword, a function has a name as well as a “block.” During programming, a programmer can use “parameter” to influence the behavior of a function. In general, week five module was the most extended model with much more subtopics to offer including Function with branches/loops Reasons for defining functions, Function stubs and Common errors, Function arguments, and Namespaces and scope resolution.

Finally, Module seven and eight were respectively based on the topics Exceptions” and “Modules and modular programming.” Notably, in week seven, we discussed how the python program handles exceptions using try and except.  For instance, we learned in this module that python handles exceptional circumstances using exception handling construct. Thus, instead of printing an error message or stopping altogether, the program continues to execute. We also discussed multiple exception handlers as well as exceptions with functions.

Week eight was based on “Modules.” The various areas during the module include finding modules, executing modules as scripts, importing specific names from a module, standard library, reloading modules, and packages. In python, a “module” saves programmers from the burden of having to write the same function repeated times in many scripts.

In conclusion, this programming module is an outstanding course that provides learners with an opportunity to develop critical skills in applying computer technology to create eco-friendly solutions to global challenges. Moreover, the knowledge gained from a programming class is valuable in our day-to-day lives as it increases the power of humankind to use computers and the internet to simple tasks.