Introduction to Programming Concepts PDF

Summary

This document provides an introduction to computer programming concepts. It covers topics such as what a computer program is, common programming tasks, programming environments, algorithms, pseudocode, flowcharts, and the design of algorithms.

Full Transcript

AGENDA 1) What is a computer Programme? 2) What can Computer Programme do? 3) Programming Environment 4) Programming basics 5) What is an Algorithm? 6) Pseudocode / Flow chart What is Computer Programme? A computer programme is a sequence of instructions written using a Computer Programm...

AGENDA 1) What is a computer Programme? 2) What can Computer Programme do? 3) Programming Environment 4) Programming basics 5) What is an Algorithm? 6) Pseudocode / Flow chart What is Computer Programme? A computer programme is a sequence of instructions written using a Computer Programming Language to perform a specified task by the computer. What can Computer programme do? Programming Environment Environment Setup, simply means the base on top of which we can do our programming. A compiler to An Integrated A text editor compile interpreter Developme to create programme to execute nt computer into binary programme Environmen programme. format. directly. t (IDE) Data Function Types Programming s Basics Variable Operator s s Keyword s What is an Algorithm? Pseudocode simple way of describing a set From a of instructions that does not programming have to use specific syntax point of view, an algorithm is a step-by- Flowchart step Diagrams that represents a set procedure to of instructions. Flowcharts resolve any normally use standard symbols problem. to represent the different types of instructions. Understanding the Problem What are the inputs into the problem? What will be the outputs of the problem? In what order do instructions need to be carried out? What decisions need to be made in the problem Are any areas of the problem repeated? Pseudocode INPUT – indicates a user will be inputting something OUTPUT – indicates that an output will appear on the screen WHILE – a loop (iteration that has a condition at the beginning) FOR – a counting loop (iteration) REPEAT – UNTIL – a loop (iteration) that has a condition at the end IF – THEN – ELSE – a decision (selection) in which a choice is made any instructions that occur inside a selection or iteration are Flowchart Pseudocode Example Planning a program that asks people what the best subject they take is, would look like this in pseudocode: Flowchart Example Planning a program that asks people what the best subject they take is, would look like this as a flowchart: Algorithm Design 1 Sequencing 2 Selection 3 Iteration It is important There are to make sure many steps that all the where steps are decisions must These are presented in be made. That steps that need the is choosing to be repeated correct order between alternatives Iteration (Flowchart) Algorithm for cleaning your teeth

Use Quizgecko on...
Browser
Browser