PHY2027 |
Scientific Programming in C |
2023-24 |
|
Dr D.M. Richards |
|
|
Delivery Weeks: |
T1:01-11 |
|
Level: |
5 (NQF) |
|
Credits: |
15 NICATS / 7.5 ECTS |
|
Enrolment: |
60 students (approx) |
|
Description
A knowledge of a computing language and how to write programs to solve physics
related problems is a valuable transferable skill. It is taught though a series
of practical sessions in which the student will initially learn to understand the
logic of the source code and are required to modify the code for a number of
prepared projects. This module yeaches the C programming language, but the principles
involved are applicable to almost every procedural programming language.
Module Aims
This module aims to give students the ability to write clearly structured,
debuggable and maintainable computer programs in ANSI C and to be able to
understand such programs written by others.
Intended Learning Outcomes (ILOs)
A student who has passed this module should be able to:
-
Module Specific Skills and Knowledge:
- construct flow charts for computer code;
- write and modify simple programs in ANSI-C;
- find errors and debug code;
- use files, keywords, structured programs and
the elements which constitute good robust programs;
- apply the principles of designing and
writing debuggable and maintainable computer programs;
- design and code data structures that reflect the problems;
- write appropriately structured code based on short routines
with a clear purpose and interfaces that are simple and unambiguous;
- explain and use standard features of the C programming
language including structures, pointers and simple memory management;
-
Discipline Specific Skills and Knowledge:
- apply logic to the solution of problems;
- keep proper records of work;
- apply the C programming language
to simple physical problems;
- present a portfolio of work;
-
Personal and Key Transferable / Employment Skills and Knowledge:
- deal with the practicalities of writing a computer program;
- think and plan in a logical manner;
- apply a structured approach to problem solving;
- make straightforward use of a professional programming IDE.
Syllabus Plan
-
Introduction
Brief historical survey.
-
ANSI C
-
The Xcode Integrated Development Environment and C-compiler
-
Local and global variables (integers, real, character)
-
Arithmetic expressions, relational, logical, increment
and decrement operators
-
Input/output (formats, data files, etc.)
-
Functions and program structure (standard functions,
user-defined functions)
-
Header files
-
Arrays (strings, multidimensional arrays)
-
Rounding errors and accuracy considerations
-
Good programming practice
-
Program design
-
Data design
-
Functions
- Variables and scope.
- Initialisation.
- Function Prototypes.
-
Memory
- Pointers
- Arrays
- Memory allocation
-
Structures
- Pointers to structures
- Using structures to pass data between functions
- Linked lists
-
Projects
A number of projects based upon the Stage 2 physics course.
The background physics required for each project is provided for
the student in the project description.
Learning and Teaching
Learning Activities and Teaching Methods
Description |
Study time |
KIS type |
11×1-hour lectures |
11 hours
|
SLT |
11×2-hour supervised computer labs |
22 hours
|
SLT |
Directed self-study and project work |
56 hours
|
GIS |
Reading to support own learning requirements |
61 hours
|
GIS |
Assessment
Weight |
Form |
Size |
When |
ILOS assessed |
Feedback |
13% |
Homework assignment |
8 hours |
Deadline Monday week T1:04 |
1-16 |
Written and verbal |
13% |
Homework assignment |
8 hours |
Deadline Monday week T1:06 |
1-16 |
Written and verbal |
30% |
Programming Knowledge and Skills Test |
1 hour 30 |
T1:06 |
1-9, 11, 13-16 |
Written and verbal |
13% |
Homework assignment |
8 hours |
Deadline Monday week T1:09 |
1-16 |
Written and verbal |
31% |
Programming Project |
32 hours |
Deadline Friday week T1:12 (Friday) |
1-16 |
Written and verbal |
Resources
The following list is offered as an indication of the type & level of information that
students are expected to consult. Further guidance will be provided by the Module Instructor(s).
Core text:
Supplementary texts:
ELE:
Further Information
Prior Knowledge Requirements
Pre-requisite Modules |
Mathematics Skills (PHY1025) |
Co-requisite Modules |
none |
Re-assessment
Re-assessment is not available except when required by referral or deferral.
Original form of assessment |
Form of re-assessment |
ILOs re-assessed |
Time scale for re-assessment |
Programming Knowledge and Skills Test |
Test (1hr 30min) 30% wt |
1-9, 11, 13-16 |
August/September assessment period |
Programming Project and Homework Assignments |
Programming Project (32 hours) 70% wt |
1-16 |
August/September assessment period |
KIS Data Summary
Learning activities and teaching methods |
SLT - scheduled learning & teaching activities |
33 hrs |
GIS - guided independent study |
117 hrs |
PLS - placement/study abroad |
0 hrs |
Total |
150 hrs |
|
|
Summative assessment |
Coursework |
70% |
Written exams |
0% |
Practical exams |
30% |
Total |
100% |
|
Miscellaneous
IoP Accreditation Checklist |
- Not applicable, this is an optional module.
|
Availability |
unrestricted |
Distance learning |
NO |
Keywords |
Physics; Program; Structures; Function; Codes; Project; Data; Computing; Ansi; Arrays; Designing. |
Created |
01-Oct-10 |
Revised |
27-Jun-19 |