CS203 Topics in Computing 2 20067 - PowerPoint PPT Presentation

1 / 55
About This Presentation
Title:

CS203 Topics in Computing 2 20067

Description:

to introduce you to concepts that you may not otherwise meet until much later in ... Create a spreadsheet template to allow the puzzle 'Equaliser' to be solved. ... – PowerPoint PPT presentation

Number of Views:46
Avg rating:3.0/5.0
Slides: 56
Provided by: personalC
Category:

less

Transcript and Presenter's Notes

Title: CS203 Topics in Computing 2 20067


1
CS203Topics in Computing 22006-7
2
Intent
  • TiC2 has the same general intent as TiC1
  • to introduce you to concepts that you may not
    otherwise meet until much later in your course
  • To let you access some tools that could be useful
  • To enable you to get 20 credits in a more relaxed
    atmosphere than in some of the intensive
    specialist classes

3
Lecturers
  • There are four lecturers who will present the
    material
  • In Semester 1
  • Dr. Richard Fryer
  • Ms. Isla Ross
  • In Semester 2
  • Dr. John McInnes
  • Mr. John Wilson

Each will be responsible for the class for a
period of six weeks, and each will set and
evaluate their own material.
4
Assessment 1
  • The class will be assessed solely on the basis of
    coursework
  • In other words there will be no written
    examination
  • Each module is worth 25
  • The pass mark, as for other classes, is 40
  • So can a student, in principle, pass the class on
    only (say) the Semester 1 work?
  • Yes, in principle, but in practice it will be
    better to perform all the work of the class

5
Things to Know about Progress
  • The Faculty of Science operates two compensation
    schemes relevant to progress
  • a Credit Mark Average (CMA) scheme
  • the Faculty of Science Average Mark Scheme
    (FoSAMS)

6
How Credit Mark Averaging works
  • The CMA is calculated as the average mark over
    all classes at the January and May diets weighted
    by the credit value of the class
  • If the CMA is 45 then class marks in the range
    35-39 may be eligible for compensation and
    converted to a 40 pass mark

7
Restrictions on CMA
  • Only first attempts may be raised by CMA
  • Carried classes cannot be raised by CMA
  • Absence from an examination without satisfactory
    explanation causes 0 to be put into CMA for that
    class
  • Classes with Outstanding Coursework cause 0 to be
    put into CMA for that class
  • Some classes are protected and cannot be raised
  • Within CIS-related courses these are currently
    all projects 52.361, 52.362, 52.395, 52.398 for
    CS 10.391 for CSL 19/52.396/397 for CES
  • A maximum of 30 new style credits are eligible
    for compensation normally these will be the
    best ones of those potentially eligible for
    compensation

8
What is recorded for CMA
  • A student obtaining a pass by credit mark
    averaging is awarded the credits for that class
    and will be notified of a pass by compensation
  • Only 40 will appear on his/her transcript but
    the initial mark will be available in his/her
    record.
  • He/She will be advised if a non-compensated pass
    is required for progress
  • e.g. if the class is a pre-requisite of a
    subsequent class or for professional requirements.

9
FoSAMS 1
  • This acts in parallel with CMA
  • but not for students of Computer and Electronic
    Systems
  • Weighted class averages are computed as an
    Overall Average and for up to two Core Groups
    for marks obtained before CMA
  • The Overall Average is for all classes in a
    students curriculum
  • Core Averages are for specified sets of
    compulsory classes
  • Within CIS the core group is basically all
    compulsory CS classes

10
FoSAMS 2
  • The Overall Average and the Core Group Average
    together form the basis of the FoSAMS Average
  • Students who achieve overall averages of 45 in
    both may progress to the next year of the degree
    course without needing to do resits in their
    outstanding subjects

11
FoSAMS 3 Restrictions
  • Only first attempts are considered for FoSAMS
  • Absence from an examination without satisfactory
    explanation causes 0 to be put into the averages
    for that class
  • Classes with Outstanding Coursework cause 0 to be
    put into the averages for that class
  • If a student does not formally withdraw from any
    class that he or she does not intend to continue,
    this class may be treated as an absence and
    included as such in the FoSAMS calculation
  • Note Progress will take place because of the
    award of FoSAMS credits but the original marks
    will appear in any transcript of the students
    record

12
Warning
  • The descriptions of CMA and FoSAMS are greatly
    simplified and not to be relied on in extremis,
    such as for an appeal
  • They also are constantly evolving in detail
  • But
  • note that every mark that you get for every class
    counts towards progress
  • in other words a bare pass is no longer good
    enough if it ever was!

13
TiC2 Module 1An Excellent Programming Language
  • at least for some things

14
A Programming Language? Excel?
  • Lets think
  • Excel is a spreadsheet
  • Spreadsheets act on data
  • They do things like adding up columns of numbers
    or taking averages
  • Boring!!!
  • But many people think programming is boring, so
    that doesnt necessarily stop Excel being a
    programming language

15
What is a Programming Language?
  • A programming language is a means of specifying
    how to turn data into information by means of a
    machine
  • By machine we normally currently mean an
    electronic digital computer but it could be
    something else
  • Babbage designed for mechanical systems
  • Neural networks can be electronic or organic
  • Anyway, the definition is pretty general

16
Terminology
  • Data numbers in some format(s)
  • Not (necessarily) (yet) meaningful
  • e.g. the digital conversion of an analog voltage
    from a temperature or pressure sensor
  • Information the meaning extracted from the data
    by means of a transformation
  • Transformation a tightly specified operation to
    convert the data to a form that can be used
  • e.g. converting to oC or kgm/m2

17
So what about Excel?
  • Well, given a list of exam marks for a class
    isnt
  • compute the class average or determine what is
    the maximum mark a transformation that converts
    data (the list of marks) into information (the
    average and/or maximum)?
  • If it is then, despite the different sort of
    programming style, Excel must be a language must
    it not?
  • Yes but still Boring!!!

18
So why teach Excel?
  • Because
  • It is a useful tool for later (e.g. for analysing
    project data)
  • It shows that not all programming has to be hard,
    or laid out in the ways encountered so far
  • It is a lot more powerful than most people realise

19
Excel permits
  • Statistical analysis of data
  • Making charts (for use in documents)
  • Producing summaries (for reports)
  • Highlighting special cases
  • Computing consequences from rules
  • Iterating functions to solve them
  • Using such facilities intelligently lets us do
    some surprisingly complex things

20
Some examples
?
The examples are not available on this site.
Bouncing things
?
?
Transport 2006
Clock
21
Lets take a look at Excel
Select Excel from the Start menu
The examples are not available on this site.
X
22
Standard Formatting
These examples were created by selecting Cells
and using the dialogue box that appeared. e.g.
23
Using Functions Finding what is there
Choose Insert Function from the Insert menu.
The dialog box allows functions to be chosen and
populated (with appropriate parameters)
24
Using Functions Getting Help
Click on this link for a more detailed
explanation of what a function does, and how to
use it
25
Using Functions Auditing for debugging
Formula Auditing is a useful debug tool. It
enables one to determine the precedents the
parameters taken from other parts of the
workbook and/or descendents the places that
use the result of a function in a cell.
26
Logical Functions
Used for testing conditions. They can be nested
to quite deep levels.
27
Statistical Functions
There are a large number of statistical tools,
including some very esoteric ones.
Commonly used ones involve summarising sets of
numbers (average, max, min, etc.) and various
forms of counting (e.g. the number of times a
particular value occurs).
28
Date and Time Functions
These functions enable operations upon dates and
times to be performed, including interrogating
the system clock as here
29
Absolute and Relative Addressing ? 1
  • As seen, a function or expression can refer to
    one or more cells
  • e.g. if cell P77 contains the expression R501
    and cell R50 contains or displays the value 8
    then cell P77 will display the value 9
  • Cell contents can be copied to other places
  • What happens to the expression then?

30
Absolute and Relative Addressing ? 2
  • It depends on how the address of cell R50 is
    referred to in cell P77
  • There are four possibilities
  • Consider a copy to cell A60

31
Excel Charts
The Chart Wizard, which appears when the
Charting Icon is clicked, allows the chart to be
constructed. The Chart Toolbar allows it to be
customised.
32
Line and Bar Charts
The coloured table was taken from the web as
indicated. Data were copied and transposed using
Paste Special from the Edit menu. A line
chart was made and the water temperature series
converted to a bar graph for emphasis
33
Scatter Charts
Data were prepared as before. An X-Y Scatter
chart was prepared to show the correlation, if
any, between rain and sunshine. The lines show
the path of the correlation through the months
recorded.
34
Another way of showing relations
Sometimes relative sizes of values are best shown
other than by lines on graphs. The main
illustration is a pie chart, but the others were
drawn from the same data
35
Conditional Formatting
The conditions can be a maximum of 3 deep
36
Iteration
Choose Calculation
Adjust as necessary
Select Options from the Tools menu
37
So we have looked at
  • Starting up
  • Functions
  • Logical
  • Statistical
  • Date and time
  • Auditing
  • Formatting
  • (including conditional)
  • Absolute and relative addressing
  • Charts
  • Iteration
  • So what to do now?
  • Well, we can take a look at how the example
    programs were constructed

38
Clock
  • The function Now() is used to find the current
    time from the system clock
  • The (numerical) value returned is analysed to
    find the digits of the hours, minutes and seconds
  • These are copied into a series of arrays
  • Conditional Formatting is used to construct
    images of the digits to be displayed
  • Note that Now() only acts when the program is run
    hence the need to repeat run by holding the F9
    key down there is no iteration for this program.

39
The derivation of the current time
Column B
Column I
The current time is available using Now() in
terms of days from January 1st 1900 day 1.
It can be viewed in various formats, here as a
number.
40
Forming the numbers
Column O
41
Transport
  • This is achieved by a combination of Conditional
    Formatting and Iteration.
  • An array of cells is formatted to show the
    background
  • A template of the train is rotated through a
    circular buffer which is copied into the display
  • Conditional formatting imposes the image of the
    train in up to three colours

42
Adding the train to the background
If none of the conditions is satisfied the green
shows through by default
43
Bouncing Things 1
  • Things are clusters of non-zero values in an
    array that is mostly filled with zeros
  • Flight is achieved by copying cell values from
    near neighbours (decrementing to give a limited
    lifetime)
  • The most important trick is to change the
    direction of flight when a thing hits a wall
  • This is done by having a pair of variables to
    indicate right/left and up/down
  • These are toggled whenever the sum of the cells
    at a boundary is non-zero

44
Bouncing Things 2
45
Bouncing Things 3
  • Conditional Formatting allows the things to be
    seen
  • The colours change because the thing-cell value
    is decremented when it is copied
  • The delay line that injects things
    periodically is just a linear array that copies
    from one cell to the next
  • On each iteration the first array cell is made
    zero if the sum of the cells is non-zero,
    otherwise a positive value is inserted
  • things are copied from the end of the delay
    line iff its value is non-zero

46
Assignments 1
  • There are three assignments for Module 1, two
    compulsory and one voluntary
  • Assignment 1 is due at the end of Week 4
  • Assignment 2 is due at the end of Week 6
  • Assignment 3 may be submitted at any time up to
    the end of Week 6
  • Submission is in two phases see the class web
    page for precise details
  • Phase 1 is a single electronic submission of the
    Excel file that is the solution an electronic
    copy of the paper report for feedback
  • Phase 2 is a single copy of a short paper report
    some vital housekeeping paperwork

47
Assignments 2
  • The assignments are to be performed by teams of
    three (no fewer) or four (no more), who will
    share the marks awarded
  • Teams of three are not at an advantage relative
    to teams of four when marks are shared out
  • There is a self-assessment mechanism that weights
    mark allocation according to the view of the team
    members as to who has contributed most
  • Sign up to teams at the first laboratory session
    Week 3
  • Take care to follow the ground rules given on the
    class web page otherwise marks will be deducted.

48
Assignment 1 Compulsory
  • Create a spreadsheet template that can compute
    and display the mark that would be returned to
    Registry by the CIS Department for a list of
    students.
  • The rules for computation of marks will be given
    on the class webpage at
  • https//www.cis.strath.ac.uk/teaching/ug/classes/C
    S.203/
  • There will also be an Excel workbook containing,
    on sheet 1, a set of marks (for fictitious
    students taking a fictitious class) that you can
    use as a test of your program
  • The output of your program should resemble the
    sample output on sheet 2 of the workbook

49
Assignment 1 Compulsory contd.1
  • Assumptions
  • Coursework counts for 20 of the final mark at
    the first attempt thereafter as the rules state
  • Any student who gains less than 50 of the marks
    available for compulsory coursework has failed
    the coursework component and therefore has
    Outstanding Coursework until that is cleared by
    submitting an acceptable response to an assigned
    exercise
  • A written examination counts for 80 of the final
    mark
  • The written examination has the rubric attempt
    three questions the examiner marks each
    question out of 20 so the paper mark is out of
    a possible 60 maximum
  • Fractional marks of 0.5 or greater are rounded up
    otherwise fractional marks are rounded down
  • The overall pass mark for the paper (including
    coursework) is 40

50
Assignment 2 Compulsory
  • Create a spreadsheet template to allow the puzzle
    Equaliser to be solved.
  • This is a puzzle that takes twelve numbers
    arranged as a grid of two rows of three and two
    columns of three like this

51
Assignment 2 2
  • The operators ,-, or / must be inserted into
    the red boxes such that each row and column
    computes to the same value
  • Note that expressions should be evaluated
    left-to-right or top-to-bottom so that normal
    operator precedence does not apply

52
Assignment 3 Voluntary
  • Any person whose team completes Assignment 2 may
    try for a bonus 5 by producing something
    novel. There is no specification other than that
    a normal spreadsheet without macros must be used
    marks awarded for ingenuity.
  • Submission by the end of week 6 latest deadline
    in the same way as for Assignments 1 and 2.

53
Final words
  • Supervised labs start in L10.09 in Week 3
  • Keep an eye on the Module 1 section of the class
    website
  • Stick rigorously to the published guidelines for
    submission of work they are part of our audit
    trail and we have to enforce them
  • Watch the class newsgroup strath.cis.teaching.ug.C
    S203 for special announcements
  • You may also use it for discussions relevant to
    the class

54
(No Transcript)
55
Questions?
Write a Comment
User Comments (0)
About PowerShow.com