Skip to document

Csc1015f 2023 orientation manual

for more details about the course
Course

Computer science1015 (CSC1015F)

257 Documents
Students shared 257 documents in this course
Academic year: 2024/2025
Uploaded by:
0followers
9Uploads
5upvotes

Comments

Please sign in or register to post comments.

Preview text

Orientation Manual

  • Computer Science 1015F/1017F/1019F
    1. INTRODUCTION Table of Contents
    1. ACCESSING AMATHUBA
      1. ACADEMIC DISHONESTY FOR COMPUTER PROGRAM SUBMISSIONS POLICY
    1. FILES AND FOLDERS
    • 3 SETTING UP ONEDRIVE
      • 3.1 Windows 10............................................................................................................................................
      • 3.1 Other Windows PC
      • 3.1 Apple Mac...............................................................................................................................................
    • 3 FOLDERS FOR YOUR PROGRAMS.
    1. PYTHON 3 AND WING IDE 101...............................................................................................................
    • 4 INSTALLING PYTHON
    • 4 INSTALLING WING
    • 4 STARTING (AND CONFIGURING) WING
    1. WRITING A PYTHON PROGRAM IN WING
    1. CREATING A ZIP FILE
    1. SUBMISSION OF ASSIGNMENT
    • 7 THE AUTOMATIC MARKER ERRORS CHECKLIST
      • 7.1 Incorrect naming of files
      • 7.1 Compressing a folder instead of a file
      • 7.1 Submitting a Program with Syntax Errors
      • 7.1 Submitting an uncompressed file to the Automatic Marker
    1. EDITING AN EXISTING PROGRAM
    1. PYTHON DOCUMENTATION

1. Introduction

This is a self-paced tutorial on the procedure for setting up your computer in order to complete Computer Science 1015F/1017F/1019F practical assignments and submit them online using the Amathuba learning management system. It is recommended that you follow the tutorial in sequence from beginning to end. However, do feel free to deviate from the procedure to explore the functions available but try not to get lost – if necessary, ask for assistance from a tutor or one of your peers (assuming they are not lost as well ☺). NOTE: We have tried to cover the steps for PC and for Mac, however, at the time of writing, only Windows 10 was available, so screen snapshots are of this. We have Windows 11 in the Scilabs now. However, the steps are quite similar. The tutorial is organised as follows: Section Content 2 Accessing the Amathuba course site and accepting the Academic Dishonesty for Computer Program Submissions Policy. 3 Configuring cloud storage and organising folders for your programs. 4 Installing Python 3 and Wing 101 IDE. 5. Writing and running a first Python program in Wing. 6. Creating a ZIP archive file. 7. Submitting an assignment to the automatic marker. 8. Editing an existing Python program. 9. Python Documentation.

2. ACCESSING AMATHUBA

The first thing you will do is log on to Amathuba. The UCT course management system. Execute a Web browser application such as Google Chrome. Enter a URL of amathuba.uct.ac/ to go to the Amathuba website. Click on UCT Login and if the Web browser pops up a box asking you for a password, this is UCT's system to control access to the outside Internet – simply enter your user ID and password as before and click Ok. NB: your user ID is your UCT student number.

The entry first is the subject of this section which will be found under Assignments. Click on Assignment 1: Orientation and Academic Dishonesty for Computer Program Submissions Policy Acceptance: Follow the instructions: read the attached policy (click on the link to the PDF document csc_2023_AcademicDishonestyPolicy); accept by typing your name, student number and current date into the ‘Assignment Text’ text box, and click Submit.

3. FILES AND FOLDERS

You will be writing lots of computer programs. You will need to set up some folders to organise these programs; to make sure that everything can be easily found in future. You also need to ensure that your work is backed up. Both requirements are covered in this section.

UCT students are provided with 1 terabyte of secure cloud storage space on Microsoft OneDrive. We explain how to set up access to this service, then we suggest a folder structure for organising your work. You may familiar with OneDrive, or similar service such as Google Drive or Drop Box. They all work in the same way. On your computer you have a special folder, the contents of which are duplicated in the cloud. You are able to create and work with files in this folder knowing that any changes are backed up. You will also be able to access those files from anywhere and with any device – such as your phone or tablet. Any changes you make to files or the contents of the folder on one device will be duplicated across all your devices. You can also work directly with the cloud copies of files using suitable Web apps. 3 Setting up OneDrive Open a web browser such as Google Chrome and enter the URL portal.office. If you have used the service before, you may be invited to pick an account, otherwise you’ll be asked to Sign in. Enter your studentnumber@wf.uct.ac, i. an email address composed of your student number and “@wf.uct.ac”. Click ‘next’. Now you will be asked to enter your UCT password:

You will see from the menu items at the top of the page that you can create files and upload files among other things. However, what we want to do is set up the OneDrive app so that you can create and edit files on your computer as you usually do but have them be transparently backed up to this online storage space. (For each file you will have a ‘local’ copy, i. on your computer, and a ‘cloud’ copy.) Click on ‘Get the OneDrive apps’ at the bottom of the left-hand panel. A new web page will open.

The next step(s) depend on whether you are using Windows or a Mac. 1 3 .1 Windows 10 OneDrive comes preinstalled on Windows 10 computers. If you are using such a computer click ‘Start OneDrive’. A new browser tab will open and a pop-up will appear. Click ‘Open Microsoft OneDrive’. Sign in with your studentnumber@wf.uct.ac and UCT password. Once set up is complete, a File Explorer window will open. 1 Details extracted from the ICTS document “Move your data from your F: drive to OneDrive for Business”.

Open your ‘OneDrive – University of Cape Town’ folder and create a new folder. Give it the name csc1015f_practical_assignments or csc1017f_practical_assignments or whatever is suitable for your course. Now double-click on the folder that you have created. You will be able to see the list of files it contains. As you can expect, the folder is empty as we have just created it! Using the same procedure, create a folder here called orientation. Double-click to change to this folder.

4. PYTHON 3 AND WING IDE 101...............................................................................................................

The aim of programming is to give the computer a series of instructions to solve a problem. Alas, the language understood by computers – machine language – is very difficult for humans to comprehend. So we use a simpler programming language and then somehow translate the program from what we can understand into something that the computer can understand. These human-understandable languages are called high-level languages, while machine language is a low-level language. Python is the high-level programming language used in this course. To be precise, Python version 3. Programs written in Python are interpreted and an equivalent set of machine instructions are executed for each Python instruction. This way we only need to know Python and not a low-level machine language. A Python interpreter is therefore the most important tool we will use. Not all programming languages work this way. Some use a tool called a compiler to convert the programs into machine code – we will use such tools in CSC1016S. Before a program can be interpreted, it is typically stored in a file and to do this we can use a text editor. Since programming happens in stages, the programmer has to switch quite a lot between a text editor and an interpreter – this can quickly get tiring. To make our lives much easier, the interpreter and text editor are usually combined into a single application called an Integrated Development Environment (IDE). The IDE recommended for use in this course is WING IDE 101, though you are welcome to use any other tools – even a separate text editor and interpreter if you wish to simply do things the hard way ☺. We have uploaded a copy of the latest version of the Python Interpreter and Wing 101 to the Amathuba website for the course. To access them, click on the ‘Content’ tab at the top, then ‘Resources’ in the left-hand column, then scroll down the list and click on the folder ‘Python and Wing 101 IDE’.

4 Installing Python Select the ‘Python’ folder. You will see sub folders for Mac and Windows, and a note for Linux Users. Click on the appropriate folder and then click on the installer file that it contains. For example, for MacOS:

Here is what you should see for a Windows installation: Note: This installer is for an earlier version of Python. A newer version can be downloaded from the Amathuba site of the course. Click ‘Install Now’. You will be asked if you wish to allow the app to install (the language varies de- pending in whether you are using a Mac or PC.) You should say ‘yes’. Click ‘Close’ when it is done. You will see a similar sequence on a Mac: licence agreement, select where to put the files, enter your Mac username and password to authorise. Click ‘Close’ when it is done. 4 Installing Wing 101 Now you need to install Wing 101. Return to the Python and Wing folder on Amathuba.

Select Wing IDE 101 and again, open the folder for your computer and download the file it contains. NOTE: The folder for Linux contains 3 files: one for Debian, one for Red Hat, and one generic compressed tar file. Once the installer file is downloaded, if it does not run automatically, open your downloads folder, and run it from there (by double clicking). You will be asked if you wish to allow the app to run, you should say ‘yes’. The file for Apple Mac is a ‘distributed disk image’. It will create a ‘virtual disk drive’/folder on your desktop. Open it and drag the contents to the Applications folder, and from there to the task bar, if you want quick access in future.

4 Starting (and configuring) Wing 101 When you run Wing 101 for the first time, you will be asked to accept the licence agreement. As WING IDE eventually starts up, it temporarily displays a splash-screen, which provides some information about the application as it is loaded into the computer’s memory. Note: the Wing 101 screenshots below were captured using version 8 of the IDE. Please download the most recent version from Amathuba. You should be able to find version 9 on Amathuba. As this is the first time you are running Wing, a quick start guide will appear as the main window.

On Windows, click the down arrow to the left of Browse and you will see a list of the Python installations on the computer. Select the line with ‘Python39’ contained within it and then click ‘Okay’. On Mac, first open a Terminal (press Command-Space bar and type ‘Terminal’ then select from search results. In the terminal window, type ‘which python3’. Copy the result to the text box in the Wing Python Configuration window and click ‘Okay’. Wing will invite you to restart. Click ‘Restart’ and when the Wing main window reopens, check the details in the bottom pane again. You should see Python 3.9.

5. WRITING A PYTHON PROGRAM IN WING

Now you’re ready to try out your new software setup with a simple Python program. We do not need the Wing quick start guide for now. Close the main window by clicking on the little red cross next to the words “Call Stack” near the top right. You will now see a blank space.

The WING IDE has 2 major panes (sections of a window) at start-up. At the top are buttons and a menu to activate various functions of the IDE. The main section is an empty canvas where editing of files will take place. The bottom pane contains a number of tabs. The “Python Shell” tab is where Python input and output will take place. (You might also see the “Search” tab open beside the “Python Shell” tab. This provides a search and replace option to help in editing – we will not use this right now.) The first step is to create a new file to store your program. You will usually do this as the first step of the solution to each part of a programming assignment. Click on File on the menu, then New. A new blank window will appear to take up the empty space.

Was this document helpful?

Csc1015f 2023 orientation manual

Course: Computer science1015 (CSC1015F)

257 Documents
Students shared 257 documents in this course
Was this document helpful?
Page 1/34
Orientation Manual
Computer Science 1015F/1017F/1019F 2023
Table of Contents
1. INTRODUCTION ...................................................................................................................................... 2
2. ACCESSING AMATHUBA .......................................................................................................................... 2
2.1. ACADEMIC DISHONESTY FOR COMPUTER PROGRAM SUBMISSIONS POLICY ................................................................... 3
3. FILES AND FOLDERS ................................................................................................................................ 4
3.1 SETTING UP ONEDRIVE ........................................................................................................................................ 5
3.1.A Windows 10 ............................................................................................................................................ 8
3.1.B Other Windows PC ................................................................................................................................. 9
3.1.C Apple Mac............................................................................................................................................... 9
3.2 FOLDERS FOR YOUR PROGRAMS. ............................................................................................................................ 9
4. PYTHON 3 AND WING IDE 101............................................................................................................... 10
4.1 INSTALLING PYTHON ..........................................................................................................................................11
4.2 INSTALLING WING 101 ......................................................................................................................................13
4.3 STARTING (AND CONFIGURING) WING 101............................................................................................................17
5. WRITING A PYTHON PROGRAM IN WING 101 ........................................................................................ 19
6. CREATING A ZIP FILE ............................................................................................................................. 24
7. SUBMISSION OF ASSIGNMENT .............................................................................................................. 27
7.1 THE AUTOMATIC MARKER ERRORS CHECKLIST .......................................................................................................29
7.1.1 Incorrect naming of files .......................................................................................................................30
7.1.2 Compressing a folder instead of a file ..................................................................................................30
7.1.3 Submitting a Program with Syntax Errors ............................................................................................31
7.1.4 Submitting an uncompressed file to the Automatic Marker ................................................................32
8. EDITING AN EXISTING PROGRAM .......................................................................................................... 34
9. PYTHON DOCUMENTATION .................................................................................................................. 34