CSCI 5400: Scientific Computing

HW1: Python

Due: Monday, 16 Jun, 11:59 PM AOE


This is a problem set of 7 problems, exactly the 7 exercises for each of the 7 lecture topics conducted over residency. This should be a simple assignment, as you should have already completed all of this work with the possible exception of the 7th problem (on SciPy). The work will consist simply of organizing and submitting Python (.py) files via email, an important part of scientific computing and publication.

Under absolutely no circumstances is any form of submission other than .py files accepted. Writing and editting these files was a core goal of three lectures, and an inability to submit homework properly is indicative of non-engagement with minimally half of the lecture content.

By Monday, 16 Jun at 11:59 PM AOE (Tuesday, 17 Jun at 7:59 AM ET), send cdeutschbein@lagrange.edu an email with the Subject: [CSCI 5400] HW1 Submission and exactly seven attachments named 01.py to 07.py, inclusive. You are not required to include any body text in the email, but may do so if there is anything you wish me to know!

Late work is not accepted. This is 7 of the 13 planned assignments, so non-completion (or late completion) is a guaranteed F in the course as it represents more than half of the graded course content.

For any questions, reach out to me via LaGrange email no latter than Friday, 13 Jun at 3 AM AOE (Friday, 13 Jun at 11 AM ET). I will respond within 8 hours. I will not grant extensions, help you configure your computer or perform other IT tasks, or provide solutions.


Files:

01.py

Links:

Notes:

  • 01.py must contain the function: single_tax
  • To be eligible for credit, outputs must exactly match the provided example.

02.py

Links:

Notes:

  • 02.py must be able to be run as python 02.py 400000 or python3 02.py 400000.
  • To be eligible for credit, must print the same values computed by 01.py at the command line.

03.py

Links:

Notes:

  • 03.py must (1) compute (a la intercepts.py) the same intercept values as provided and (2) compute taxation using provided intercept values (a la tax.py or tax_line.py.
  • To be eligible for credit, must compute the same values computed by 01.py.

04.py

Links:

Notes:

  • 04.py must compute (a la intercepts.py the intercept values provided and (2) exclusively use vector operations and NumPy operations, so there may be no use of for or while loops or variables which are not NumPy arrays.
  • To be eligible for credit, must compute the same values computed by 03.py.

05.py

Links:

Notes:

  • 05.py must, when run as python 05.py or python3 05.py create image file shown as a sample solution:
    • 3 lines of exponential functions for the 1s, 2s and 3s hydrogenic orbitals.
    • Lines must be distinct colors and labelled with a legend.
    • The graphic must have axis labels and a title.
    • The axis units and scale must be correct.
  • To be eligible for credit, the file must be named 05.svg and be able to be opened by Firefox or Chrome web brower.
  • It must require no Python libraries other than NumPy and Matplotlib.

06.py

Links:

Notes:

  • 06.py must, when run as python 06.py or python3 06.py create image file shown as a sample solution:
    • A "periodic table like grid" scatterplot with groups on the horizontal axis and periods on the vertical axis.
    • Points must be colored according to electonegativty and labelled with a colorbar.
    • The graphic must have axis labels and a title.
    • The axis units and scale must be correct.
  • To be eligible for credit, the file must be named 06.svg and be able to be opened by Firefox or Chrome web brower.
  • It must require no Python libraries other than NumPy, pandas and Matplotlib.

07.py

Links:

Notes:

  • 07.py must contain:
    • Your calculations using NumPy and pandas of the density of Technetium, without reference to its known density.
    • Calculations using LinearNDInterpolator, without reference to its know density.
    • The value of the density of Technetium from the provided .csv file.
    • A `print` statement, printing all three values, in that order.
  • To be eligible for credit, the file when run as python 07.py or python3 07.py must print these three values, in order, in a single line.