Announcement 3: Final Semester Grades
The following figure is the histogram of the grand total grade for this course.
The following figure is the histogram of the grand total grade for this course.
This lecture discusses some further important topics in Python: Decorators and Classes. Pyton Decorators In simple words, Python decorators are functions that can modify (e.g., add to) the functionalities of other functions. As will be described below, decorators are particularly...
This homework further explores Monte Carlo methods in Python. 1. Monte Carlo approximation of the number $\pi$. Suppose we did not know the value of $\pi$ and we wanted to estimate its value using Monte Carlo methods. One practical approach...
This quiz aims at testing your basic knowledge of Python’s I/O. 1. Consider this comma-separated data file. Write a simple Python code outputter.py that takes two command line arguments like the following, python outputter.py outputter.in outputter.out and then writes the...
This lecture discusses some further important topics in Python IO, the use of random numbers and Monte Carlo simulations, as well as methods of integrating Python codes with codes from other programming languages, in particular, the use of Python as...
This homework aims at giving you some experience with Python’s tools for interacting with the World Wide Web and writing Monte Carlo simulations. Update: As I discussed in class, in order to avoid creating potential traffic on Professor Butler’s webpage,...
This lecture focuses on array computing and code vectorization, as well as methods of plotting data in Python. Vectorization and array computing With regards to capabilities of Python for scientific calculations, there are conflicting opinions. On the scientific side of...
This homework aims at giving you some experience with Python’s array computing and plotting features. 1. The while-loop implementation of a for-loop. Consider the following mathematical function resembling a Hat function, \[f(x) = \begin{cases} 0 ~, & \text{if}~~ x<0 \\...
This quiz aims at testing your basic knowledge of Python’s modules, loops and simple I/O. Don’t forget to push your answers to your remote repository by the end of quiz time. Push your quiz-6 readme.md file to quiz/6/ folder in...
This lecture further explains topics on Input/Output processes and error handling in Python, as well as methods of testing the accuracy and robustness of your code. I/o (continued) So far in this course, we have indirectly discussed several methods of...
This homework aims at giving you some experience with Python I/O, error handling in your code, and testing you code for accuracy and robustness. 1. Write a simple program named sum.py, that takes in an arbitrary-size list of input floats...
This lecture explains modules, loops, with a brief introduction to Input/Output processes in Python. Ideally, modules should have been part of the previous lecture (with Python functions). The split was however necessary to reduce the size of lecture 6 to...
This homework aims at giving you some experience with Python for-loops and while-loops as well as reading user input from the Bash command line. 1. The while-loop implementation of a for-loop. Consider the following example code, which converts a list...
This quiz aims at testing your basic knowledge of Python’s print function, and the how to string manipulation in Python. Don’t forget to push your answers to your remote repository by the end of quiz time. Push your quiz-5 readme.md...
This lecture explains branching statements, how to define functions in Python, and all other important details of functions in Python. Branching in Python Consider the last problem in homework 4, where we defined a dictionary of people names and their...
This homework aims at giving you some experience with variables in Python and their syntax, also some experience with using Lists and Dictionaries in Python. Write your Python scripts with the corresponding *.py file names, and add a readme.md file...
This quiz aims at testing your basic knowledge of Python’s print function, and the how to string manipulation in Python. Don’t forget to push your answers to your remote repository by the end of quiz time. Push your quiz-4 readme.md...
This lecture further explains different types of variables in Python, branching statements, how to define functions, and what Python modules are. Programming glossary The following table summarizes some of the important keywords in this lecture for you. Table 1. Some...
This homework aims at giving you some experience with variables in Python and their syntax, also some experience with using Lists and Dictionaries in Python. Write your Python scripts with the corresponding *.py file names, and add a readme.md file...
This lecture aims at guiding you to understand the how to of programming, difference between programming languages and the natural languages, the type of programming errors and the meaning code debugging how to perform simple arithmetic operations on the Python...