INB270 - Programming (Lecture 2, Week 2)

1 Page
Unlock Document

Mike Roggenkamp

INB270 – Programming Lecture 2 – Week 2 The following notes are for the first lecture, starting from approximately page 40 of the lecture slides, as this information was not reached in the first lecture in week 1.  Input is always stored in the memory of the computer, or in other words, in a variable.  Each variable will have a name, a type and an assigned value.  Variables are restricted based on what their type is. Variables must be declared before use, or they will simply not exist in the program. Variable types also determine how the value is stored in memory, and what type of operations can be applied to that variable.  Variable types include integer (a whole number), double (numbers with a decimal place) and Boolean (either true or false). The remainder of the notes here are from the second lecture’s slides.  In addition to the first three items on the list of things computers can do, computers can do basic maths (addition, subtraction, multiplication, division), they can compare two values and make a decision, and they can repeatedly execute a sequence of instructions.  When writing code, it is important to give variables meaningful names so that it is easier to identify what the variable is when reading the code back. It is important to note that
More Less

Related notes for CAB201

Log In


Join OneClass

Access over 10 million pages of study
documents for 1.3 million courses.

Sign up

Join to view


By registering, I agree to the Terms and Privacy Policies
Already have an account?
Just a few more details

So we can recommend you notes for your school.

Reset Password

Please enter below the email address you registered with and we will send you a link to reset your password.

Add your courses

Get notes from the top students in your class.