CS 115 - Introduction to Computer Science 1
School of Computer Science
University of Waterloo

Course Philosophy

Welcome to CS 115!

CS 115 has been designed with the diverse interests, backgrounds, and goals of students always in mind. As we are aware of the varied ways in which this material might be of use in the future, we have included concepts that are beautiful and universal. The focus of the course is foundational concepts in computer science (rather than the mechanics of programming) and ways of thinking about computation (rather than solving tasks in a rote fashion). Students will learn skills that are applicable to new languages and environments, not just those used in the course. Because of the fundamental nature of the concepts taught in CS 115, the course can serve both students whose primary interest in computers is in their use in their chosen areas of study and students intending to minor in CS.

A lot of the information on this page can also be found in a separate course outline.


For questions related to course content, contact an instructor or an ISA. The best place to ask questions is on Learn discussion or email, but you can also send email or visit during office hours. For questions about marking, contact the Assistants first, who will consult with the Instructor if necessary.


Cameron Morland
Email: cjmorland@uwaterloo.ca
Final Exam Office Hours:
Monday August 3rd: 10:00am–12:00pm
Tuesday August 4th: 1:00pm–3:00pm
Wednesday August 5th: 8:30am–10:30am
Thursday August 6th: 9:00am–11:00am
Friday August 7th: 12:00pm–2:00pm

Instructional Support Assistants (ISAs)

Jessica Payne
Email: cs115@uwaterloo.ca
Final Exam Office Hours:
Tuesday August 4th: 10:00am–12:00pm, 3:00pm–5:00pm
Wednesday August 5th: 12:00pm–2:00pm
Thursday August 6th: 1:00pm–2:00pm
Friday August 7th: 10:00am–12:00pm

Instructional Support Coordinator (ISC)

Barbara Daly
Email: bmzister@uwaterloo.ca

Office Hours

Instructions for joining Teams can be found here.

Final Exam office hours:





Tuesday August 4th 10:00am-12:00pm
MS Teams ISA Jessica
Wednesday August 5th 12:00pm-2:00pm
Thursday August 6th 1:00pm-2:00pm
2:00pm–4:00pm (Q&A Session)
Friday August 7th 10:00am-12:00pm
Tuesday August 4th 12:00pm-1:00pm MS Teams IA Greg
Wednesday August 5th 10:30am-12:00pm
Thursday August 6th 11:00am-1:00pm
Monday August 3rd 10:00am–12:00pm MS Teams Professor Cameron Morland
Tuesday August 4th 1:00pm–3:00pm
Wednesday August 5th 8:30am-10:30am
Thursdsy August 6th 9:00am-11:00am
Friday August 7th 12:00pm-2:00pm


Discussion Participation 4%
Weekly Reflection 4%
Labs 3% (bonus)
Assignments 70%
Midterm 8%
Final 14%

You must pass the assignment component in order to pass the course.

You must pass the weighted exam average in order to pass the course.

You must pass the course to receive the 3% lab bonus. The bonus is how many of the 11 marked labs you passed. A lab is passed when more than 50% of the basic tests have been passed.

Assignment 0 is not worth any marks, but it MUST be submitted for all other grades to be counted.

Your assignment with the lowest mark will be dropped from your final grade, you must however have successfully completed a minimum of 6 assignments and Assignment 0 must be completed (excluding discipline cases).

In the Discussion Board make at least one meaningful post per week to get full participation marks.

If you have any grievances about an assignment's marking, please email cs115@uwaterloo.ca with your quest ID, the assignment, and the concern you have about the grading. Students will have 2 weeks to appeal an assignment grade after the grade has been posted on MarkUs. Note that remarking for the midterm/final is handled by instructors. If you would like an exam remarked, please follow the instructions posted on Learn which will be posted later into the term.

Schedule and Course Materials

*** Please note, all times are in EDT.

Discuss Modules, Labs, and Assignments in the Discussion Board.

Week Lectures Labs Assignments/Exam
May 11
Module 1: Introduction
Module Interface File
Textbook: How To Design Programs
Lab 1 (Getting Started)
Finish by Tuesday May 19th 4:00PM
Nothing to submit.
Assignment 0 due Wednesday May 20th 10:00AM
Assignment 0 Q3 Interface
Assignment 0 Q4 Interface
Please right-click the link to save the Interface Files, do not copy and paste them.
May 18
Module 2: The Design Recipe
Module Interface File
Lab 2 due Monday May 25th 4:00PM
Lab 2 Interface
May 25
Module 3: Working With Lists
Module Interface File
Lab 3 due Monday June 1st 4:00PM
Lab 3 Interface
Assignment 1 due Wednesday May 27th 10:00AM
Assignment 1 Interface
[List of Allowed Built in Functions]
June 1
Module 4: Making Decisions
Module Interface File
Lab 4 due Monday June 8th 4:00PM
Lab 4 Interface
Assignment 2 due Wednesday June 3rd 10:00AM
Assignment 2 Interface
[List of Allowed Built in Functions]
June 8
Module 5: Deconstructing and Constructing Lists
Module Interface File

Lab 5 due Monday June 15th 4:00PM
Lab 5 Interface
Assignment 3 due Wednesday June 10th 10:00AM
Assignment 3 Interface
[List of Allowed Built in Functions]
June 15
Module 5 Continued

Lab 6 due Monday June 22nd 4:00PM
Lab 6 Interface
Assignment 4 due Wednesday June 17th 10:00AM
Assignment 4 Interface
[List of Allowed Built in Functions]
June 22
Module 6: Recursion
Module Interface File
Lab 7 due Monday June 29th 4:00PM
Lab 7 Interface
Assignment 5 due Wednesday June 24th 10:00AM
Assignment 5 Interface
[List of Allowed Built in Functions]
June 29
Module 7: Advanced Recursion
Module Interface File
Lab 8 due Monday July 6th 4:00PM
Lab 8 Interface
Midterm: Thursday July 2, 2020
July 6
Module 7 Continued
Lab 9 due Monday July 13th 4:00PM
Lab 9 Interface
Assignment 6 due Wednesday July 8th 10:00AM Assignment 6 Interface
[List of Allowed Built in Functions]
July 13
Module 8: Other Data Structures
Module Interface File
Lab 10 due Monday July 20th 4:00PM
Lab 10 Interface
Assignment 7 due Wednesday July 15th 10:00AM
Assignment 7 Interface
[List of Allowed Built in Functions]
July 20
Module 9: Trees
Module Interface File
Lab 11 due Monday July 27th 4:00PM
Lab 11 Interface
Assignment 8 due Wednesday July 22nd 10:00AM
Assignment 8 Interface
[List of Allowed Built in Functions]
July 27
Module 10: Imperative Programming
Module Interface File
Lab 12 due Tuesday August 4th 4:00PM
Lab 12 Interface
Assignment 9 due Wednesday July 29th 10:00AM
Assignment 9 Interface
[List of Allowed Built in Functions]
August 3

Exam Review
Assignment 10 due Wednesday August 5th 10:00AM
Assignment 10 Interface
[List of Allowed Built in Functions]


Midterm: Thursday July 2nd

Final Exam Information:
The final will be similar to the midterm. Since some students are on co-op workterms, I want to ensure everyone has plenty of time to complete their work as well as possible. So I have scheduled the exam to be both weekend and weekday.

It will become available at 16:00 on Friday August 7. You should finish submission to MarkUs by 16:00 on Monday August 10. You have 3 days (72 hours) to complete your work. Like the midterm, this should be vastly more time than you need. I expect most students should be able to complete the work in 3 hours.

As with the midterm, submit your questions as you complete them; do not leave it all to submit at the last minute.


Follow the link below to access assignment solutions. Please note that solutions to labs will not be posted.


Common Errors

Common errors found on assignments and the midterm will be posted below.

  • Assignment 1
  • Assignment 2
  • Assignment 3
  • Assignment 4
  • Assignment 5
  • Assignment 6
  • Assignment 7
  • Assignment 8
  • Assignment 9

  • How to Submit on MarkUs


    To log in to MarkUs, please ensure that you are doing the following:

    • Use Firefox, Safari, or Chrome to access Markus. MarkUs does not work properly with Internet Explorer or Edge.
    • Use all lowercase letters when entering your userid on the CAS page. Using uppercase letters will render you unrecognizable to the system.
    • Use the link to MarkUs provided on the menu at the left.

    If you encounter a "Login Failed" message, check that you meet the above three criteria before contacting course personnel. If you are still experiencing issues or have run into different errors (such as a redirect problem), please e-mail the ISAs with your Quest userid and a brief description of your error.

    Submitting Assignments

    To submit files for Assignments, follow the instructions below.

    1. On your MarkUs homepage, click the assignment name to go to its submission page.
      This box shows you how many files you have submitted and how many of the required files you are missing. The Missing Required Files will initially be equal to the number of files you have to submit. As you submit the properly named files, this number will decrease.
      Assignment Rules
      This box has the assignment name, due date, and the names of the required files for the assignment. You must name your assignment submissions as indicted by the list: a lowercase a followed by a 0, then the assignment number, then a lowercase q followed by the question number. The file extension must be .rkt. For example, for Assignment 2 Question 3, your file should be named a02q3.rkt.
      The names of the lab files are similar to how you name assignment files: a lowercase l (l stands for "lab"; not a capital i nor a number 1) followed by two digits for the lab number, then a lowercase q followed by the question number. For example, the file name for Lab 1 Question 2 should be l01q2.rkt.
    2. Click the "Submissions" tab at the top of the page.
    3. Click "Add A New File". A new row will be added to the table. Click "Choose File" or "Submit" in the new row. (The button's name will depend on your web browser.) In the window that appears, browse to where you have saved your file and select it. Click the Submit button.
    4. Your submitted file will now appear in the table. Check that the filename is correct. If you click on the filename, you will see the contents of the file. You should check that the contents are correct, and that you have submitted what you wanted to submit.

    Replacing a file

    You can only replace a file with one that has the same name.
    Warning Do not use Internet Explorer to replace files. It will appear as though the change has gone through when it has not. Your files will not be replaced.

    • Under the "Replace" column, click "Choose File" or "Browse" for the file you want to replace. In the window that appears, browse to the replacement file and select it. Click the Submit button.

    Deleting a file

    If you have submitted the incorrect file, you can delete it by selecting the "Delete" box for the file and then clicking Submit. This is also an alternative way to replace a file: delete the file you want to replace and submit the correct version/file.

    Viewing Assignment Marks and Results

    Once marking for an assignment is completed, you can see your mark for each assignment on your MarkUs home page. For a more detailed breakdown of your mark along with marker comments, click the "Results" link.

    • On the right is your mark breakdown:
      Under this tab you can see the level you received for each criterion.
      Under this tab you can see the weight for each catagory and how your mark was added up.
    • On the left is the code for one of your files.
      1. To see marker comments, click on the left drop-down box (it is above and to the right of ''Annot. Summary'').
      2. Select "GRADED_ASSIGNMENT.rkt". This file contains all of your submissions.
      3. Put your mouse over any lines that are yellow. A box will appear with the marker's comments about that particular line of code, or a general note about your submission.
        The ''Annot. Summary'' tab contains a list of all the comments a marker has made to your assignment. Click on the link at the top left of each comment to go to the associated code.

    Copy Paste Error

    If you receive the following error when you submit your code to MarkUs, then you most likely have a Copy Paste Error:

    Error creating evaluator, application: not a procedure;

    The Copy Paste Error is caused by inputting a symbol into your code that our testing software cannot support in a Racket file. Click here to see what it makes your code look like. And just to be crystal clear, the code is not supposed to look like that.

    Causes of the Copy Paste Error include:
    • Copying certain symbols from the interactions window to the definitions window.
    • Inserting comment boxes.
    • Inserting images into Dr. Racket.
    • Copying from PDF documents into Dr. Racket
    • Inserting symbols from different language settings on the keyboard
    • Many many more!

    This error is subtle! Your code will most likely still run in your Dr. Racket, but when submitted to MarkUs, the code will explode into this. Make sure you always review the basic test results to ensure that there were no issues when submitting!

    How to fix a Copy Paste Error

    To fix a Copy Paste Error, you should save your code as text. To do this you click File > Save Other > Save Definitions as Text...

    Please be aware that Copy Paste Errors will cause your code to fail all of the tests run on it, meaning you will lose marks for having it! Don't let it be a problem.


    Course technology

    • Follow this link to Install DrRacket .
    • If you have any questions, you can ask them on Learn in the Discussion Forum. Keep in mind that course staff probably will not answer questions late at night, so try to ask questions early!

    Other documentation

    • There are a few general documents that will help you get through this course. Make sure you've read the Survival Guide for starters. Then, before submitting code for assignments and labs, make sure you're up to speed on our suggested Style Guide and that you know how to submit code on MarkUs.
    • The string documentation can be found here.

    Allowed Built-In Functions

    Each assignment identifies the modules that are covered. Unless the question specifically describes exceptions, you are restricted to using the functions and special forms covered in lectures and described in this post for all assignment solutions. A grade of zero will be applied to any question that uses other functions. As the term goes on, more functions will be added for each module.

    Here is a list of allowable Built-In Functions that will be updated weekly:
    Module 2
  • Assignment 1 Allowed Functions
  • Module 3
  • Assignment 2 Allowed Functions
  • Module 4
    • basic comparison functions, e.g. =, >, >=, >, <=, equal?, string>?, etc.
    • and, or, not
    • any type predicate function, e.g. string?, number?, integer?, etc.
    • any predicate that tests the nature of its parameter, e.g. even?, negative?, zero?, etc.
    • list->string, string->number, string->list, number->string
    • cond

    Assignment 3 solutions may only use functions and special forms from Modules 1, 2, 3, 4. Unless otherwise stated, you may use any function that was previously allowed.

    Module 5 (Assignment 4)
    • filter
    • cons
    • list, range, map, foldr, length, first, rest, list->string
    • first, second, third
    • predicates:
      • not
      • =, <, >, <=, >=
      • string=?, string>?
      • char=?, char>?, char-ci>?, char-numeric?
      • equal?, number?, string?, char?, boolean?, member?, odd?, even?
      • and, or

    Assignment 4 solutions may only use functions and special forms from Modules 1, 2, 3, 4, 5. Unless otherwise stated, you may use any function that was previously allowed.

    Module 5 (Assignment 5)
    • cons, list
    • first, rest, second, third, fourth, fifth, sixth, seventh, eigth
    • lambda
    • map, foldr, filter, range
    • member?
    • string->list, list->string

    Assignment 5 solutions may only use functions and special forms from Modules 1, 2, 3, 4 and 5. Unless otherwise stated, you may use any function that was previously allowed.

    Module 6
    • cond
    • cons, first, rest
    • equal?, empty?

    Assignment 6 solutions may only use functions and special forms from Modules 1, 2, 3, 4, 5, and 6. Do not use map, foldr, filter, length, append or range on Assignment 6. Unless otherwise stated, you may use any function that was previously allowed.

    Module 7
    • cond
    • cons, first, rest
    • equal?, empty?

    Assignment 7 solutions may only use functions and special forms from Modules 1, 2, 3, 4, 5, 6, and 7. Do not use map, foldr, filter, length, append or range on Assignment 6. Unless otherwise stated, you may use any function that was previously allowed.

    Module 8
    • define-struct (and the functions it creates)
    • map, filter, foldr

    Assignment 8 solutions may only use functions and special forms from Modules 1 to 8. Unless otherwise stated, you may use any function that was previously allowed.

    Module 9
    • filter
    • map
    • foldr
    • cond

    Assignment 9 solutions may only use functions and special forms from Modules 1 to 9. Unless otherwise stated, you may use any function that was previously allowed.

    Module 10
    • local

    Assignment 10 solutions may use any functions and special forms from Modules 1 through 10. Unless otherwise stated, you may use any function that was previously allowed.

    Assignment Information

    General information

    All Assignments will be posted on the course website AND the Assignment folder on Learn.

    Please note that all assignment and lab deadlines are in EDT.

    Before submitting code for assignments, you should familiarize yourself with the code style guidelines and read the instructions on how to submit.

    Lab computers are available to complete assignments on should you have any technical difficulties with your personal computer. We highly recommend to regularly back up your files, to prevent lost progress.

    Assignments are designed to give you practice in the concepts and skills discussed in lecture, to prepare you for exams, and to give you feedback on your mastery of course material. You rob yourself of these benefits if you hand in work that is not your own. Please read the section below on Academic Integrity, including the linked UW Policies and Avoiding Academic Offenses. These apply to every course you will take at UW, and you should be familiar with them.

    Preamble: Each assignment has a preamble which explains the assignment requirements and restrictions. Read carefully. Changes from one assignment to the next will be highlighted.

    Help: Each assignment will have its own discussion board on Learn broken down by question. Use these forums to ask for clarification on assignment questions, lecture material, or Racket in general. Do not post code. If you are worried about whether or not your question is appropriate, you can make a private post.

    Basic Tests: Check Markus to see the basic test results for your submitted files. Note that basic tests only check to see if your code will run on our marking server and that any required spelling of functions, parameters, etc. or number of parameters/arguments is correct. It does not generally do testing to verify the correctness of your code as per the assignment specifications; that is something you must check.

    Accessing Files: To use any of the Racket files, you must save them from the webpage onto your computer by right clicking on the file name and seleting the option "Save Link as...". This will open a dialogue box that will allow you to save the Racket file on your computer and open it using DrRacket on your computer. Please do not use Internet Explorer to attempt to access files; the option to save the file does not exist. Any other browser is acceptable.

    Interface Files: With every assignment, we will typically include an "interface" which contains the correct spelling of all functions and structures requested by the assignment. Since the markers will be running our tests of your code, spelling errors can result in loss of marks. Use the interface provided as a starting point for your own work.

    Style guidelines: Your assignment submissions should conform to the guidelines laid out in the style guide. Some of the main points are summarized here.

    • The file for one question should have a file extension of .rkt.
    • Please do not submit code using the embedded Special Boxes offered by DrRacket, such as Comment Boxes or Test Boxes; these cause major problems for our marking procedures.
    • Use semicolons for comments, and check-expect tests as described in the style guide and in lecture.
    • Do not cut anything out of the Interactions window of DrRacket and paste it into the Definitions window. There is no need for you to do this, and because of the way DrRacket works, what you are pasting is not simple text; it also causes major problems with our marking procedures.

    Submission: You will submit program files electronically through MarkUs as described in how to submit.

    Late assignments: Late assignments will not be accepted; consequently, you should aim to finish early, to allow for unexpected delays. You may submit a single question as often as you wish; submitting a partially-completed solution is a good idea, just in case you don't get back to it in time. After an assignment due date has passed, you may still submit your work for feedback only (no marks) but you must inform the CS 115 ISAs by email so they are aware of your submission and request for feedback.

    Missed work due to illness: With appropriate, authorized documentation, assignment work may be excused. If a missed assignment is excused, its weight is distributed over the remaining un-excused assignments. In the interest of understanding the course material for future assignments and exams, students who miss work are encouraged to do it, submit it and request feedback from the ISAs.

    Marked assignments: Corrected assignments will be available on MarkUs, usually the week after the assignment is due. Complete solutions will be available online under the solutions tab. Review the feedback that is provided on the marked assignment and in the Post-Mortems.

    Remark requests for assignments: If, after checking the marking on MarkUs, the post mortem comments and the solutions, you believe that errors were made in the marking, please email a ISA via cs115@uwaterloo.ca, preferably from your uWaterloo email account for verification of who you are, and state clearly what questions or components you feel were mis-marked and why. The subject for the email should be cs115 Assignment X Remark Request with the assignment number filled in appropriately. If you are not emailing from your uWaterloo email, then include your uWaterloo(Quest) username and student ID. The deadline for remark requests is 2 weeks after the marks are released on MarkUs. To ensure fairness and equality, remark requests are usually processed together after the deadline.


    All work in CS 115 is to be done individually. The penalty for plagiarism on assignments (first offense) is an assigned mark of 0 percent on the assignment and a 5 percent reduction of the final grade, consistent with School of Computer Science policy. In addition, a letter detailing the offense is sent to the Associate Dean of Undergraduate Studies, meaning that subsequent offenses will carry more severe penalties, up to suspension or expulsion.

    To avoid inadvertently incurring this penalty, you should discuss assignment issues with other students only in a very broad and high-level fashion. Do not take notes during such discussions, and avoid looking at anyone else's code, on screen or on paper. If you find yourself stuck, contact the ISA or instructor for help, instead of getting the solution from someone else. Do not consult other books, library materials, Internet sources, or solutions (yours or other people's) from other courses or other terms.

    Rules for group work: All assignments are to be done individually.


    Academic Integrity

    In order to maintain a culture of academic integrity, members of the University of Waterloo community are expected to promote honesty, trust, fairness, respect and responsibility. [Check www.uwaterloo.ca/academicintegrity/ for more information.]


    MOSS (Measure of Software Similarities) is used in this course as a means of comparing students' assignments to ensure academic integrity.


    A student who believes that a decision affecting some aspect of his/her university life has been unfair or unreasonable may have grounds for initiating a grievance. Read Policy 70, Student Petitions and Grievances, Section 4, www.adm.uwaterloo.ca/infosec/Policies/policy70.htm. When in doubt please be certain to contact the department's administrative assistant who will provide further assistance.


    A student is expected to know what constitutes academic integrity [check www.uwaterloo.ca/academicintegrity/] to avoid committing an academic offence, and to take responsibility for his/her actions. A student who is unsure whether an action constitutes an offence, or who needs help in learning how to avoid offences (e.g., plagiarism, cheating) or about 'rules' for group work/collaboration should seek guidance from the course instructor, academic advisor, or the undergraduate Associate Dean. For information on categories of offences and types of penalties, students should refer to Policy 71, Student Discipline, www.adm.uwaterloo.ca/infosec/Policies/policy71.htm. For typical penalties check Guidelines for the Assessment of Penalties, www.adm.uwaterloo.ca/infosec/guidelines/penaltyguidelines.htm.


    A decision made or penalty imposed under Policy 70 (Student Petitions and Grievances) (other than a petition) or Policy 71 (Student Discipline) may be appealed if there is a ground. A student who believes he/she has a ground for an appeal should refer to Policy 72 (Student Appeals) www.adm.uwaterloo.ca/infosec/Policies/policy72.htm.

    Students with Disabilities

    AccessAbility Services (AAS), located in Needles Hall, Room 1132, collaborates with all academic departments to arrange appropriate accommodations for students with disabilities without compromising the academic integrity of the curriculum. If you require academic accommodations to lessen the impact of your disability, please register with AAS at the beginning of each academic term.

    Mental Health Resources

    Mental Health: If you or anyone you know experiences any academic stress, difficult life events, or feelings like anxiety or depression, we strongly encourage you to seek support.

    On-campus Resources

    Off-campus Resources

    • Good2Talk (24/7): Free confidential help line for post-secondary students. Phone: 1-866-925-5454
    • Here 24/7: Mental Health and Crisis Service Team. Phone: 1-844-437-3247
    • OK2BME: set of support services for lesbian, gay, bisexual, transgender or questioning teens in Waterloo. Phone: 519-884-0000 extension 213

    Diversity: It is our intent that students from all diverse backgrounds and perspectives be well served by this course, and that students’ learning needs be addressed both in and out of class. We recognize the immense value of the diversity in identities, perspectives, and contributions that students bring, and the benefit it has on our educational environment. Your suggestions are encouraged and appreciated. Please let us know ways to improve the effectiveness of the course for you personally or for other students or student groups. In particular:

    • We will gladly honour your request to address you by an alternate/preferred name or gender pronoun. Please advise us of this preference early in the semester so we may make appropriate changes to our records.
    • We will honour your religious holidays and celebrations. Please inform of us these at the start of the course.
    • We will follow AccessAbility Services guidelines and protocols on how to best support students with different learning needs.

    More Information

    Academic Integrity and Students with Disabilities