Git Product home page Git Product logo

Comments (3)

tbekolay avatar tbekolay commented on July 23, 2024

Hmm. My interpretation of this challenge was that it was not meant to be executed; it's asking the student to mentally simulate what this code would do, regardless of the actual value that left and right point to. Being able to say what it does for one example is not really what we want, we want the student to think of it at a higher level. That is, a correct answer would be "it swaps what is in left and right", but "right would be 'L' and left would be 'r'" would not be a full answer even though it would be true for a particular example. If a student wishes to put it in the interpreter to see what it does, then I would tell them to make left and right be whatever they want.

That's a pedagogical preference / style though... I can also see the argument for including a particular example, even though we want the student to answer more generally. So, could other instructors that have taught this (or a similar) lesson chime in on whether we should initialize these variables?

from python-novice-inflammation.

kynan avatar kynan commented on July 23, 2024

I use this as an abstract example. It's straightforward to understand without the variables being initalized I think.

from python-novice-inflammation.

abostroem avatar abostroem commented on July 23, 2024

I had the same thought as @janetriley. I think it is useful to give students a concrete example (that they can execute) and then ask them to abstract from there.

from python-novice-inflammation.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.