Navigation
next
Introduction to Programming
»
Introduction to Programming
ΒΆ
Week 1 notes
(
slides
)
Course overview
Lecturer
Lab Tutor
Learning outcomes
Resources
Where can I practise programming?
Can I practise programming on my PC / Mac?
How do I use the Windows compiler?
I am still having problems with the Windows compiler. How about a video?
Assessment
Lab exam rules
Summer exam
Acknowledgement
Week 1 exercises
Course overview
Entering, compiling and running programs
Linux commands at a glance
A simple calculator
Week 2 notes
(
slides
)
Hello world
Variables
Integer arithmetic
Floating point arithmetic
Strings
Data input
Week 2 exercises
Summing numbers
Multiplying numbers
Printing strings
Perimeter and area of a square
Perimeter and area of a circle
Volume of a cone
Fahrenheit to Celsius converter
Stones and pounds to kilograms
Week 3 notes
(
slides
)
Decisions
Combining logical tests
Negation
if...else
switch
Week 3 exercises
Ordering numbers
Minimum of three numbers
Water
Digits
Days in a month
The elevator
Grades
Even and odd numbers
Triangles
Leap years
Week 4 notes
(
slides
)
while loops
do...while loops
A simple menu program
Week 4 exercises
Printing numbers
Printing more numbers
Printing even more numbers
Summing numbers
An infinite loop
Maximum value during loop
Minimum value during loop
Detecting successive identical values
Interest
Double your money
Fibonacci
Week 5 notes
Revision
Week 5 exercises
Summing numbers
Maximum value in a loop
Minimum value in a loop
Summing until sentinel
Factorial
Debugging code
Week 6 notes
Week 6 exercises
Week 7 notes
(
slides
)
Some more arithmetic operators
for loops
Some more for loops
Summing numbers with a for loop
Week 7 exercises
Summing a series with a while loop
Summing a series with a for loop
Summing another series with a for loop
Summing one last series with a for loop
Week 8 notes
(
slides
)
Arrays
Initialising an array
Displaying array contents
Constants
Summing the elements of an array
Finding the maximum value in an array
Week 8 exercises
Practice with one-dimensional arrays
More practice with one-dimensional arrays
Sorting a one-dimensional array
Using one-dimensional arrays for some vector calculations
Week 9 notes
(
slides
)
Sorting an array
Two-dimensional arrays
Summing elements of a two-dimensional array
Matrix multiplication
Week 9 exercises
Summing two-dimensional arrays
Symmetric matrix
Transpose of a matrix
Printing rows
Printing columns
Summing diagonals
Going to the theatre
Matrix multiplication
Matrix multiplication solution
Week 10 notes
(
slides
)
Functions
Functions with arguments
Multiple arguments
Returning data from a function
What if a function does not return a value?
Week 10 exercises
Volume of a sphere
Returning the volume of a sphere
Calling a function in a loop
Volume of a cone
Graphing a function
Week 11 notes
(
slides
)
Pass by value
Pass by reference
Returning more than one value from a function
Week 11 exercises
Decrementer
Swapper
Converter
Minimum and maximum
Quadratic roots
Revision
Week 12 notes
Week 12 exercises
Lab exam 1 (2014)
Lab exam: Question 1
Lab exam: Question 2
Lab exam: Question 3
Lab exam: Question 4
Lab exam: Question 5
Lab exam 2 (2014)
Lab exam: Question 1
Lab exam: Question 2
Lab exam: Question 3
Lab exam: Question 4
Lab exam: Question 5
Navigation
next
Introduction to Programming
»