Homework 0

Introduction

This assignment gets you started with the basic tools you will need to complete all of your homework projects. This project will

Problem Description

You are a student who needs to install Python, configure it for command line use, and learn how to use a programmer’s text editor to create and edit Python source code.

Solution Description

On Unix/BASH you can create both of these directories at once with

$ mkdir -p sabic/hw0

Windows uses the same commands for directory navigation and creation, cd and mkdir, but Windows’s mkdir command doesn’t have the -p option.

Note: the $ is the command prompt on most Unix shells and Windows 10’s Ubuntu BASH shell (would be something like C:\> in Windows cmd), the text after it is what you enter.

$ python --version 2> hw0-output.txt

> redirects the output of a program, in this case to the hw0-output.txt file. Since Python prints its version string to STDERR instead of STDOUT, we replace the > with 2> and try again. Some versions of Python, such as the one installed by Anaconda and miniconda, write the Python version to stderr instead of stdout. > redirects stdout and 2> redirects stderr. For more informaiton, this blog post has a nice discussion of the file descriptors stdin, stdout and stderr.

print("\u004D\u0065\u006F\u0077 " * 9)
print("...")
print("\u004D\u0065\u006F\u0077\u0021")

Turn-in Procedure

Submit your hw0-output.txt file on Canvas as an attachment. When you’re ready, double-check that you have submitted and not just saved a draft.

Verify the Success of Your Submission to Canvas

Practice safe submission! Verify that your HW files were truly submitted correctly, the upload was successful, and that your program runs with no syntax or runtime errors. It is solely your responsibility to turn in your homework and practice this safe submission safeguard.