0% found this document useful (0 votes)
71 views13 pages

İşkur Bulut Teknolojileri Programlama Temelleri: Ankara Yildirim Beyazit University

The document discusses key concepts related to computers and programming. It defines computers as machines that can perform operations fast on various data types like numbers, text, images. Programs are sets of instructions that tell computers what to do. The software development process involves analyzing problems, designing algorithms, writing code, testing, and maintaining programs. It also discusses programming languages, high-level languages, and interpreters and compilers that translate languages to machine code.

Uploaded by

KEVSERKURT
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
71 views13 pages

İşkur Bulut Teknolojileri Programlama Temelleri: Ankara Yildirim Beyazit University

The document discusses key concepts related to computers and programming. It defines computers as machines that can perform operations fast on various data types like numbers, text, images. Programs are sets of instructions that tell computers what to do. The software development process involves analyzing problems, designing algorithms, writing code, testing, and maintaining programs. It also discusses programming languages, high-level languages, and interpreters and compilers that translate languages to machine code.

Uploaded by

KEVSERKURT
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 13

İŞKUR

Bulut Teknolojileri
Programlama Temelleri
Ankara Yildirim Beyazit University
Computer Engineering
• Computer
– a machine that manipulates information in the form
of numbers and characters

• Data
– particular characters that are used to represent
information in a form suitable for storage,
processing, and communication

• Computers can deal with different types of data:


– numbers, text, images, graphics, sound, ...
• Computers are machines that
– have the ability of performing a limited set of operations
tremendously fast
– do not have the ability of reasoning (cannot think and decide)
– Humans have to prepare necessary list of instructions

• Computer Program
– a set of instructions that tells the computer what to do

• Programming
– the act of giving instructions to the computer

• Computer Programmer
– a person who prepares those instructions
Software Development Method

1. Analyze the problem


2. Develop an algorithm
3. Write code for the program
4. Run the program
5. Test the results
6. Maintain and update the program
Analyze the Problem - Example
• Problem
– Given a distance in meters and the speed of a car in miles per hour
(mph), calculate how many minutes it will take for that car to travel
that distance.

• Problem Inputs
– distance (in meters)
– speed (in mph)

• Problem Output
– time (in minutes)

• Formulas
distance in miles = distance in meters / 1609.344
time in hours = distance in miles / speed in mph
time in minutes = time in hours x 60
• Algorithm
– a finite sequence of clear, unambigious instructions that,
when followed, will produce the answer to a given
problem

• Programming Language
– set of rules, symbols and special words used to construct a
program

• Convert each algorithm step into one or more


statements in a programming language, such as C.
Expressing Algorithms
• Narrative Description
Example: The algorithm of the car problem in narrative description:

– Get the data.


• Get the distance in meters.
• Get the speed of the car in mph.
– Perform the computations.
• Calculate the time in minutes.
– Convert the distance in meters to miles.
distance in miles = distance in meters / 1609.344
– Calculate the time in hours.
time in hours = distance in miles / speed in mph
– Convert the time in hours to
minutes. time in minutes = time in
hours x 60
– Display the result(s).
• Display the time in minutes.
Flowchart
• Flowchart
– diagrammatic (pictural) representation of an algorithm

• A flowchart shows the logic of an algorithm, using a standard


symbolism
– start and end of an algorithm are represented by an oval shape
– computation by a rectangular shape
– decision by a diamond shape
– input and output operations by shapes symbolizing the media
used
– boxes are connected by directed lines indicating the order in
which the operations are to be carried out.

Start/End Compute Decision Input Output


Flowchart Example

• Problem
– Display Unsuccessful if the average of two grades is less than
50, Successful otherwise.

• Problem Inputs
– two grades

• Problem Output
– the message Unsuccessful or Successful

• Formula
average = sum of the grades / 2
Flowchart Example

Start

grade1
grade2

average = (grade1 + grade2) / 2

T F
average < 50

Unsuccessful Successful

End
• Pseudocode
– stylized, half natural language, half code method

– written in a natural language, but the sentence structure and indentation look like
a programming language.

– do not have not a standard syntax or style. Everyone can select his/her own syntax
and style. The important thing is, he/she should be consistent, thus use the same
words and symbols for similar operations, and the algorithm should be clear and
easy to be understood by everybody.

• Example:

Input grade1, grade2


average = (grade1 + grade2) / 2
if (average < 50)
Output “Unsuccessful”
else
Output “Successful”

• Inclass Exercise: Develop the algorithm of the car problem


using flowchart and pseudocode representations.
Introduction to Programming Languages
• Code
something written in a programming language

• Machine language
computer only understands (consists of 0’s and 1’s)

• Assembly language
assembler translates the assembly language program into a machine language programso that
the computer can execute it

• FORTRAN language (FORmula TRANslator)


first high-level language invented, mostly used for scientific and engineering calculations

• COBOL language (COmmon Business Oriented Language)


designed to handle large amounts of data like customer information, employee information etc.
(very efficient in data processing, it had limited computational capabilities)

• PL/I (Programming Language One)


for both scientific and business applications

• BASIC (Beginner's All-purpose Symbolic Instruction Code) and Pascal Languages

• C, C++, Ada, Java, Lisp, Prolog and so on.


High-level Language to Machine Language Translators

• Interpreter
– translates a single source code statement into
its object code equivalent, executes the object
code, and then goes on to the next source code
statement, translates and runs it, and so on.

• Compiler
– translates the entire source code program,
producing an object code file which can then
be executed.

You might also like