30
2015-2016

A Powerpoint - Herefordshire and Ludlow Collegewiki.hct.ac.uk/_media/computing/hnd/hndu18_lecture01.pdf · (Assignment 1) 2. Be able to design procedural programming solutions. (Assignment

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: A Powerpoint - Herefordshire and Ludlow Collegewiki.hct.ac.uk/_media/computing/hnd/hndu18_lecture01.pdf · (Assignment 1) 2. Be able to design procedural programming solutions. (Assignment

2015-2016

Page 2: A Powerpoint - Herefordshire and Ludlow Collegewiki.hct.ac.uk/_media/computing/hnd/hndu18_lecture01.pdf · (Assignment 1) 2. Be able to design procedural programming solutions. (Assignment

Introduction to Programming

Phil Smith

Page 3: A Powerpoint - Herefordshire and Ludlow Collegewiki.hct.ac.uk/_media/computing/hnd/hndu18_lecture01.pdf · (Assignment 1) 2. Be able to design procedural programming solutions. (Assignment

Learning outcomesOn successful completion of this unit you will:

1. Understand the principles of procedural programming. (Assignment 1)

2. Be able to design procedural programming solutions.(Assignment 1)

3. Be able to implement procedural programming solutions. (Assignment 2)

4. Be able to test procedural programming solutions. (Assignment 2)

More detail on the wiki.

Page 4: A Powerpoint - Herefordshire and Ludlow Collegewiki.hct.ac.uk/_media/computing/hnd/hndu18_lecture01.pdf · (Assignment 1) 2. Be able to design procedural programming solutions. (Assignment

Assessment - PassLets review the assessment criteria. (wiki)http://wiki.computing.hct.ac.uk/computing/procedural_programming

Pass criteria.

Page 5: A Powerpoint - Herefordshire and Ludlow Collegewiki.hct.ac.uk/_media/computing/hnd/hndu18_lecture01.pdf · (Assignment 1) 2. Be able to design procedural programming solutions. (Assignment

Assessment - Merit

Page 6: A Powerpoint - Herefordshire and Ludlow Collegewiki.hct.ac.uk/_media/computing/hnd/hndu18_lecture01.pdf · (Assignment 1) 2. Be able to design procedural programming solutions. (Assignment

Assessment - Distinction

Page 7: A Powerpoint - Herefordshire and Ludlow Collegewiki.hct.ac.uk/_media/computing/hnd/hndu18_lecture01.pdf · (Assignment 1) 2. Be able to design procedural programming solutions. (Assignment

Assignments 3 summative assignments

Each has a formative assignment with feedback.

Page 8: A Powerpoint - Herefordshire and Ludlow Collegewiki.hct.ac.uk/_media/computing/hnd/hndu18_lecture01.pdf · (Assignment 1) 2. Be able to design procedural programming solutions. (Assignment

Structure 1.5 hours of lectures – approx.

1.5 hour of tutorial/lab (approx.),

Lab work will mostly be in small groups.

Additional independent study.

Page 9: A Powerpoint - Herefordshire and Ludlow Collegewiki.hct.ac.uk/_media/computing/hnd/hndu18_lecture01.pdf · (Assignment 1) 2. Be able to design procedural programming solutions. (Assignment

Resources Lectures.

Books (in lab).

Books in LRC.

Internet, you have internet access.

Periodicals etc.

Page 10: A Powerpoint - Herefordshire and Ludlow Collegewiki.hct.ac.uk/_media/computing/hnd/hndu18_lecture01.pdf · (Assignment 1) 2. Be able to design procedural programming solutions. (Assignment

Environment Programming Language:

Python

Use Idle – no IDE (as such) and pycharm?

Why?

1. Easy to learn.

2. Quick to write.

3. No complicated IDE.

4. Able to cover all programming principles.

5. But! (see over)

Page 11: A Powerpoint - Herefordshire and Ludlow Collegewiki.hct.ac.uk/_media/computing/hnd/hndu18_lecture01.pdf · (Assignment 1) 2. Be able to design procedural programming solutions. (Assignment

Environment this unit is not about the language, this is just syntax.

It is about (learning outcomes again)

the principles of programming,

being able to design procedural programming solutions,

implement the solutions (writing the code – python),

test the solutions.

Python is good for procedural programming but it can also cater for OOP and EDP.

Page 12: A Powerpoint - Herefordshire and Ludlow Collegewiki.hct.ac.uk/_media/computing/hnd/hndu18_lecture01.pdf · (Assignment 1) 2. Be able to design procedural programming solutions. (Assignment

Environment Procedural programming is one of three programming

paradigms.

Can you name the other 2??

Page 13: A Powerpoint - Herefordshire and Ludlow Collegewiki.hct.ac.uk/_media/computing/hnd/hndu18_lecture01.pdf · (Assignment 1) 2. Be able to design procedural programming solutions. (Assignment

EnvironmentOnce you learn the principles of programming you can then skin it with any language you like.

So this unit is much more than learning python! But we will need python to help us.

Page 14: A Powerpoint - Herefordshire and Ludlow Collegewiki.hct.ac.uk/_media/computing/hnd/hndu18_lecture01.pdf · (Assignment 1) 2. Be able to design procedural programming solutions. (Assignment

Schedule - Python Problem solving and programming The compilation process Data types and assignment statements User Input Simple selection constructs More complex selection constructs The switch statement While constructs The for statement Strings Text files in Python Arrays Two-dimensional arrays Modules GUI

Page 15: A Powerpoint - Herefordshire and Ludlow Collegewiki.hct.ac.uk/_media/computing/hnd/hndu18_lecture01.pdf · (Assignment 1) 2. Be able to design procedural programming solutions. (Assignment

About me

More than 35 years working in industry and education within the computing world.

In my time I have learnt about a dozen different computer languages.

My favourite is probably in the Microsoft camp C#, Vb.

I also like php, javascript etc.

I very much like writing (not playing) computer games, when I can get the time.

My strength is computer software in all it’s guises.

Page 16: A Powerpoint - Herefordshire and Ludlow Collegewiki.hct.ac.uk/_media/computing/hnd/hndu18_lecture01.pdf · (Assignment 1) 2. Be able to design procedural programming solutions. (Assignment

About you What are your computer experiences –

For example-

Any experience of computers, if so what?

Any experience of computer languages?

How recent?

What interests you?

Software, hardware, networking, everything?

Page 17: A Powerpoint - Herefordshire and Ludlow Collegewiki.hct.ac.uk/_media/computing/hnd/hndu18_lecture01.pdf · (Assignment 1) 2. Be able to design procedural programming solutions. (Assignment

Start

Let’s get started?

Page 18: A Powerpoint - Herefordshire and Ludlow Collegewiki.hct.ac.uk/_media/computing/hnd/hndu18_lecture01.pdf · (Assignment 1) 2. Be able to design procedural programming solutions. (Assignment

Problem solving and programming What do we mean by the term ‘computer program’?

The Concise Oxford Dictionary has the following definitions of the words ‘computer’ and ‘program’ :

Computer

automatic electronic apparatus for making calculations or controlling operations expressible in numerical or logical terms …

Program

series of (coded) instructions to control operation of a computer or other machine. …

Page 19: A Powerpoint - Herefordshire and Ludlow Collegewiki.hct.ac.uk/_media/computing/hnd/hndu18_lecture01.pdf · (Assignment 1) 2. Be able to design procedural programming solutions. (Assignment

Program

Computer programming is the art or and craft of producing a computer program to perform some task or process.

The ‘series of (coded) instructions’ we use ‘to control the operation of a computer’ is called a computer program.

When we produce a computer program we are communicating with the computer telling it what to do.

Page 20: A Powerpoint - Herefordshire and Ludlow Collegewiki.hct.ac.uk/_media/computing/hnd/hndu18_lecture01.pdf · (Assignment 1) 2. Be able to design procedural programming solutions. (Assignment

Program Computers can do such a wide variety of things

because they can be programmed.

This means that computers are not designed to do just one job, but to do any job that their programs tell them to do.

A program is a set of instructions that a computer follows to perform a task.

We use a computer programming language as a means of communication.

Page 21: A Powerpoint - Herefordshire and Ludlow Collegewiki.hct.ac.uk/_media/computing/hnd/hndu18_lecture01.pdf · (Assignment 1) 2. Be able to design procedural programming solutions. (Assignment

Examples Some examples of how we communicate with people

to perform some task or process.

Recipes.

Knitting patterns.

Flat pack instructions.

Giving verbal or written instructions to others

Page 22: A Powerpoint - Herefordshire and Ludlow Collegewiki.hct.ac.uk/_media/computing/hnd/hndu18_lecture01.pdf · (Assignment 1) 2. Be able to design procedural programming solutions. (Assignment

And so …. Programs are commonly referred to as software.

Software is essential to a computer because it controls everything the computer does.

All of the software that we use to make our computers useful is created by individuals working as programmers or software developers. (could be you in the future?)

Page 23: A Powerpoint - Herefordshire and Ludlow Collegewiki.hct.ac.uk/_media/computing/hnd/hndu18_lecture01.pdf · (Assignment 1) 2. Be able to design procedural programming solutions. (Assignment

Examples Any questions yet?

Some computing definitions

Page 24: A Powerpoint - Herefordshire and Ludlow Collegewiki.hct.ac.uk/_media/computing/hnd/hndu18_lecture01.pdf · (Assignment 1) 2. Be able to design procedural programming solutions. (Assignment

Python Getting started with python.

So what editor do we use to write python code?

Is it an IDE?

Page 25: A Powerpoint - Herefordshire and Ludlow Collegewiki.hct.ac.uk/_media/computing/hnd/hndu18_lecture01.pdf · (Assignment 1) 2. Be able to design procedural programming solutions. (Assignment

Python basics What we need to know to get started.

We will use IDLE (python shell) to interactively enter python code (just to start with).

Python is case sensitive.

Python is a loosely type language.

Python is scripted (not managed code).

Use JIT compiling.

Python is good for procedural programming???

Page 26: A Powerpoint - Herefordshire and Ludlow Collegewiki.hct.ac.uk/_media/computing/hnd/hndu18_lecture01.pdf · (Assignment 1) 2. Be able to design procedural programming solutions. (Assignment

Python basics

Each high-level language has its own set of predefined words that the programmer must useto write a program. The words that make up a high-level programming language are knownas key wordsor reserved words. Each key word has a specific meaning, and cannot be usedfor any other purpose. Table 1-2 shows all of the Python key words

Page 27: A Powerpoint - Herefordshire and Ludlow Collegewiki.hct.ac.uk/_media/computing/hnd/hndu18_lecture01.pdf · (Assignment 1) 2. Be able to design procedural programming solutions. (Assignment

Worked tutorial Find and start IDLE on your PC.

Lets explore Python language fundamentals.

Page 28: A Powerpoint - Herefordshire and Ludlow Collegewiki.hct.ac.uk/_media/computing/hnd/hndu18_lecture01.pdf · (Assignment 1) 2. Be able to design procedural programming solutions. (Assignment

Lab01 Now do Lab01

Page 29: A Powerpoint - Herefordshire and Ludlow Collegewiki.hct.ac.uk/_media/computing/hnd/hndu18_lecture01.pdf · (Assignment 1) 2. Be able to design procedural programming solutions. (Assignment

Independent study Handout - week 1

if week==1:

print(‘Do not forget the research handout’)

Page 30: A Powerpoint - Herefordshire and Ludlow Collegewiki.hct.ac.uk/_media/computing/hnd/hndu18_lecture01.pdf · (Assignment 1) 2. Be able to design procedural programming solutions. (Assignment

What have we learnt today?

1. Fundamentals of python IDE!

2. Basis of procedural programming.