CSE 163, Winter 2021: Using Ed

Discussion

You can learn more about Ed Discussion here.

Lessons

In this tab, you'll find the lecture readings. There will be an entry for ever day of lecture (released right after the previous lecture). You can view a lecture reading by clicking on it in the main Lessons page.

Once in a lesson, you should see a screen like the image below. The lecture reading is made of multiple slides and your completion of these slides is shown on the left hand side of the page (with a progress bar at the bottom). If you see a green check-mark next to every slide, then you are done!

Ed lesson slide view

Many of the slides are simply text that sometimes contain runnable code. In these slides, you can usually edit the code snippets to answer any "what if" questions you might have. The other slides are checkpoints that ask you to answer some type of question or write code to solve some problem. For example, a code checkpoint might look like the following:

Ed lesson checkpoint view

The code checkpoint works very similarly to a homework assignment (described below). You can edit the code in the app and then run or test it. There are two options to run your code:

  • Run: Simply runs the program you are writing. This does not submit your work.
  • Mark: Submits your solution and runs our test-suite on your code. It then replaces the problem prompt with the output of the tests to show you any errors. You may mark a solution as many times as you want, but you should not mark it after the deadline (as it will be marked as late).

Assessments

In this tab, you will find each homework assignment that you can complete. Here, you will find a full featured editor that you can implement your solution starting with the scaffold as seen in the picture below. Similarly to lessons, to submit your homework and run it against the tests using the Mark button. As with lessons, you may mark your assignment as many times as you want, but if you mark it after the deadline it may use a late day (or not be accepted if after the late-cutoff).

Ed assessment view

You may have noticed that there is no Run button on this page. That is because there is not always just one file you want to run for your homework. You might want to run your main file, or you might want to run the test cases you write, or you might want to run the style checker. Unfortunately, there is not just one button to do any of these things so we will need to use the command line (or Terminal in Ed). The terminal is a prompt that you can type commands and the computer will print their output. To start the terminal, you can just click the bottom half of the screen that says "Click here to activate the terminal". For example, the ls command prints out the contents of your project directory. One of the nice things in Ed is that you don't really need to know how to fully use a terminal, you just need to know the following commands:

  • python <FILE_NAME> will run the file with the given name in Python.
    • For example: python hw1_main.py or python hw1_test.py
  • flake8 <FILE_NAME> will run the style checker on the file with the given name
    • For example: flake8 hw1_main.py or flake8 hw1_test.py
    • Hint: You an run flake8 on all Python files by typing flake8 *.py

See the next section for some common Python tips and gotchas.

Additionally, there are some things you can configure about the editor using the gear icon on the top-right of the page.

You can look at your previous submissions (versions you marked) by clicking on the Submissions button. Once we have finished grading an assignment, you can look at your most recent submission in the list to find the feedback and score (there will be a comment emoji next to the submission that was graded). When you click on the submission that was graded, you will see a screen like the one below. The Feedback tab on the right shows you in-line comments left by the TA who graded your assignment. The View Feedback button on the left displays the criteria and overall points as well as any overall feedback left by the grader.

Ed assessment feedback view

Python FAQ

  • My program crashed and now I can't run anything again

    It's likely that your program crashed due to an error interpreting your code. If you wrote the incorrect syntax, Python crashes but does not exit. This means you are no longer in a Terminal, but rather a Python interpreter. To fix this, you must exit the Python interpreter by clicking on the terminal prompt and typing in Ctrl-D or exit() to exit. In Ed you can also just click the "Reset" button on the top-right of the terminal. Once you do this, you should be able to re-run your program (can press the up-arrow to use the previous command).

  • What if I just want to try something out quick in Python without needing to write a whole Python script?

    The python command by itself will start an Python interpreter that you can type Python into. This is nice for testing out small things or looking at documentation (explained below). Like the previous point, you need to exit using one of the methods above once you're done.

  • How do I look at the documentation of a function in Python?

    Python has a built-in function called help. In Python, you may write help(print) to pull up the documentation for the print function. You can use the arrow keys or j and k to move up and down pages. To quit, type q.