Logo
  • Home
  • Classes
  • Conveying Computing
  • Exams
  • Fractal Gallery
  • Guides
  • Problem Sets
  • Syllabus

Bug in Exam Question

Posted by David Evans on 28 Nov 2011 in Exams | 3 comments

There is a bad mistake in the Question 6 of the exam!

The example shown in incorrect. The result should be:

> (define p (mlist 1 2 3 4 5))
> (make-cumulative! p)
> p
{1 3 6 10 15}

The value of each element in the result should be the sum of all elements in the original list up to and including that element. So, the first element in the output list is 1 = 1, the second is 1 + 2 = 3, the third is 1 + 2 + 3 = 6, the fourth is 1 + 2 + 3 + 4 = 10, and the fifth is 1 + 2 + 3 + 4 + 5 = 15.

Sorry for the confusion on this. You will receive full credit for this question if your answer either solves the problem as corrected here, or produces the same outputs as the example shown in the original exam.

Special thanks to Caroline Mattey for reporting the problem.

Print Friendly Print Get a PDF version of this webpage PDF

3 Responses to “Bug in Exam Question”

  1. Filip says:
    29 November 2011 at 9:47 am

    Aha. I thought it was weird, but at the end I figured that cumulative sum must be the sum of all previous sums, and the next element… :-)

  2. Deirdre Regan says:
    29 November 2011 at 12:45 pm

    Also, are there any “optional, ungraded questions” at the end of this exam? The cover sheet mentions them, but I don’t see any in the PDF or my hard copy.

    • David Evans says:
      29 November 2011 at 12:46 pm

      No, there aren’t. Sorry, I forgot to remove that from the cover sheet. You should, of course, feel free to add your own questions and/or comments if you think that would be helpful.


Fall 2011

Register
Login

Help Schedule

(all in Davis Commons, except Dave's office hours in Rice 507)
Sundays, 1-6pm (Valerie/Joseph/Kristina)
Mondays, noon-1:30pm (Kristina)
Mondays, 1:15-2:00pm (Dave, Rice 507)
Tuesdays, 11am-noon (Dave, Rice 507)
Tuesdays, 5-8pm (Valerie/Jonathan)
Wednesdays, 5-6:30pm (Jiamin)
Thursdays, 9:45-11am (Dave, Rice 507)
Thursdays, 1-2:30pm (Joseph)
Thursdays, 4:30-7:30pm (Jonathan/Jiamin)
Fridays, noon-1:30pm (Peter)

Recent Posts

  • Course Wrap-Up
  • Class 41: The Cake of Computing
  • PS8 Submissions
  • Class 40: GuardRails, Big Data, and Secure Computation
  • Exam 2 Solutions

Recent Comments

  • David Evans on Problem Sets
  • jacob777 on Problem Sets
  • Prof. K.R. Chowdhary on Class 41: The Cake of Computing
  • Anon on Exams
  • Anon on Exams

Index

  • Classes
    • Class 1: Computing
    • Class 2: Language
    • Class 3: Rules of Evaluation
    • Class 4: Constructing Procedures
    • Class 5: Procedures Practice
    • Class 6: Programming with Data
    • Class 7: Programming with Lists
    • Class 8: Recursive List Procedures
    • Class 9: Consistent Hashing
  • Conveying Computing
  • Exams
  • Fractal Gallery
  • Guides
    • DrRacket Guide
    • Schemer’s Guide to Python
  • Problem Sets
    • Problem Set 0: Course Registration, Racket
    • Problem Set 1: Making Mosaics
      • PS1 Comments
    • Problem Set 2: Sequence Alignment
      • PS2 Comments
    • Problem Set 3: Limning L-System Fractals
      • PS3 – Comments
    • Problem Set 4: Constructing Colossi
      • PS4 – Comments
    • Problem Set 5: Wahoo! Auctions
      • PS5 Comments
    • Problem Set 6: Adventures in Charlottansville
      • PS6 Comments
    • Problem Set 7: Charming Snakes with Mesmerizing Memoizers
      • PS7 Comments
      • PS7 Responses
    • Problem Set 8 (Part 2): Typed Aazda
    • Problem Set 8: From Aazda to aaZda (Part 1)
      • PS8 Part 1 Comments
  • Syllabus
    • Course Pledge
  • Using These Materials

RSS BA Computer Science

RSS Jefferson’s Wheel

  • Algorithmic Accountability and the Law
  • Microsoft Security Data Science Colloquium: Inference Privacy in Theory and Practice
  • Fact-checking Donald Trump’s tweet firing Christopher Krebs
  • Voting Security

RSS Hacker News

  • Putin's Billion Dollar Palace
  • Never Been Seen: Science Museum Group Collection
  • Nabis (YC W19) hiring software engineers (PST ± 3h) to ship $1B of cannabis
  • Three Mathematicians We Lost in 2020
  • Exploring the Supply Chain of the Pfizer/BioNTech and Moderna Covid-19 Vaccines

RSS Babbage

cs1120 | RSS | Comments RSS | Book | Using These Materials | Login | Admin | Powered by Wordpress