### Announcement 3: Final Semester Grades

The following figure is the histogram of the grand total grade for this course.

### Homework 10: Solutions - Python advanced, Monte Carlo methods

This is the solution to Homework 10: Problems - Python advanced Monte Carlo. The following figure illustrates the grade distribution for this homework. Maximum possible points is 100. This homework further explores Monte Carlo methods in Python. 1.  Monte Carlo...

### Lecture 11: Python advanced topics - decorators and classes

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...

### Homework 9: Solutions - Python advanced IO, Monte Carlo

This is the solution to Homework 9: Problems - Python advanced IO, Monte Carlo. The following figure illustrates the grade distribution for this homework. Maximum possible points is 100. This homework aims at giving you some experience with Python’s tools...

### Homework 10: Problems - Python advanced, Monte Carlo methods

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...

### Quiz 7: Solutions - Python - I/O, error handling, and tesing frameworks

This is the solution to Quiz 7: Problems - Python - I/O, error handling, and tesing frameworks. The following figure illustrates the grade distribution for this quiz. Maximum possible points is 100. This quiz aims at testing your basic knowledge...

### Quiz 7: Problems - Python - I/O, error handling, and tesing frameworks

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...

### Lecture 10: Python advanced topics - IO, Monte Carlo, wrappers and interoperability

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...

### Homework 9: Problems - Python advanced IO, Monte Carlo

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,...

### Homework 8: Solutions - Python array computing and plotting

This is the solution to Homework 8: Problems - Python array computing and plotting. The following figure illustrates the grade distribution for this homework. Maximum possible points is 100. This homework aims at giving you some experience with Python’s array...

### Lecture 9: Python - array computing and plotting

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...

### Homework 8: Problems - Python array computing and plotting

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, A scalar implementation of this function would be, def...

### Homework 7: Solutions - Python I/O, error handling, and unit testing

This is the solution to Homework 7: Problems - Python I/O, error handling, and unit testing. The following figure illustrates the grade distribution for this homework. Maximum possible points is 100. This homework aims at giving you some experience with...

### Quiz 6: Solutions - Python modules, loops, and IO

This is the solution to Quiz 6: Problems - Python modules, loops, and IO. The following figure illustrates the grade distribution for this quiz. Maximum possible points is 100. This quiz aims at testing your basic knowledge of Python’s modules,...

### Quiz 6: Problems - Python modules, loops, and IO

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...

### Lecture 8: Python - I/O, error handling, and testing frameworks

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...

### Homework 7: Problems - Python I/O, error handling, and unit testing

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...

### Lecture 7: Python - modules, loops, and I/O

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...

### Homework 6: Solutions - Python modules, loops, and I/O

This is the solution to Homework 6: Problems - Python modules, loops, and I/O. The following figure illustrates the grade distribution for this homework. Maximum possible points is 100. This homework aims at giving you some experience with Python for-loops...

### Homework 6: Problems - Python modules, loops, and I/O

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...