User Tools

Site Tools


notes:cprog:fall2022:projects:dow0

BACKGROUND

You need to create a program that will calculate exactly what day of the week will be on January 1st for the entire century. To do this there are simple methods for the math behind the calculations, You can find an example here https://www.almanac.com/how-find-day-week

SPECIFICATIONS

PROGRAM

OUTPUT SPECIFICATIONS

VERIFICATION

To verify your code, there is a program in the project files, named “dow0verify”. This will run through your program, inputting each year from 2000 - 2099 to check if your output is correct.

For each line, the program will give you the following:

  • The year that was entered
  • The expected output
  • What your program actually output
  • If the test failed or succeeded

At the end, the verification program will tell you how which years your output did not match, and it will give you a final score of how many years you got right.

NOTE: Your Raspberry pi is a 32-bit system. Due to memory limitations and how computers handle time and dates, the verification program will NOT work on your pi past the year 2038. You will have to run it on lab46, which is 64-bit.

You can use this program to verify that your code gives the right answers, as well outputting that answer in the correct way.

notes/cprog/fall2022/projects/dow0.txt · Last modified: 2022/09/22 03:19 by rspringe