Sign in to confirm you’re not a bot
This helps protect our community. Learn more

COMP1511 - Programming Fundamentals Week 2 - Lecture 3

1:04

What did we learn last week? COMP1511 as a subject C as a programming language • Basic Syntax • printf and scan • Variables (ints and doubles) • Maths operators (+,-,,/ and ) • Relational Operators (, -, etc)

1:56

What are we covering today? Going slightly deeper in programming... • Recap of some of the concepts introduced last week • Continuing learning about if statements • Some in-depth thinking about problems • Processes for solving problems • Continuing the Dice Checker, but with more nuance

5:25

Recap - Variables • Data storage in memory • Made up of bits (and bytes are sets of 8 bits) • Chosen for a specific purpose int-32 bit integer numbers double - 64 bit floating point numbers • We choose the name try to make it meaningfull . We can change the value as we go

9:52

Spending some time figuring out exactly what we aim to do (or what's stopping us from getting there) is important • Keeping the problem in mind keeps you focused on a solution

22:37

A process for problem solving We can develop a way to approach all problems 1. Figure out what's wrong (or what we need to solve) 2. Find out what our options are (what code could we write or change?) 3. Assess those options

26:58

Back to the Dice Checker We created a program that: • Asked the user to input their dice values • Reported back whether the total was above or below a target value Let's look at one problem that might occur • What if the user enters incorrect values? • Too high or too low?

34:50
Lecture 3, COMP1511 - Programming Fundamentals 2020 Term 3
Lecture 3 - if Statements and Problem Solving Continuing from the basic programming we started last week, we're going to be looking at some processes for thinking our way around problems and assessing different ways we can use code to solve them. We'll be continuing our work with if statements and adding a bit of complexity.

Follow along using the transcript.

Marc Chee

1.61K subscribers