A Powerpoint - Herefordshire and Ludlow...

Post on 07-Apr-2020

0 views 0 download

Transcript of A Powerpoint - Herefordshire and Ludlow...

2015-2016

Introduction to Programming

Phil Smith

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.

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

Pass criteria.

Assessment - Merit

Assessment - Distinction

Assignments 3 summative assignments

Each has a formative assignment with feedback.

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.

Resources Lectures.

Books (in lab).

Books in LRC.

Internet, you have internet access.

Periodicals etc.

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)

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.

Environment Procedural programming is one of three programming

paradigms.

Can you name the other 2??

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.

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

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.

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?

Start

Let’s get started?

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. …

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.

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.

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

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?)

Examples Any questions yet?

Some computing definitions

Python Getting started with python.

So what editor do we use to write python code?

Is it an IDE?

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???

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

Worked tutorial Find and start IDLE on your PC.

Lets explore Python language fundamentals.

Lab01 Now do Lab01

Independent study Handout - week 1

if week==1:

print(‘Do not forget the research handout’)

What have we learnt today?

1. Fundamentals of python IDE!

2. Basis of procedural programming.