3 Problem Solving Concepts For The Computer
3 Problem Solving Concepts For The Computer
Contents
Problem Solving Concepts for the • Introduction
Computer • Constants and Variables
• Data Types
David T. Makota
• Operators
Faculty of Computing and Mathematics
The Institute of Finance Management • Expressions and Equations
Dar Es Salaam, Tanzania
Problem Solving Concepts for the Computer Problem Solving Concepts for the Computer
Lecture ii Introduction
1
BCS 1, BCSEC 1 & BIT 1 10/30/2023
Introduction
• problems that can be solved on computers
– Computational
• Problems involving some kind of mathematical processing
– Logical
• Problems involving relational or logical processing Problem Solving Concepts for the Computer
• The kinds of processing used in decision making on the computer Constants and Variables
– Repetitive
• problems involving repeating a set of mathematical and/or logical
instructions. CSU07101/ITU07101/CYU07106 - Problem Solving CSU07101/ITU07101/CYU07106 - Problem Solving
5 6
Techniques Techniques
2
BCS 1, BCSEC 1 & BIT 1 10/30/2023
3
BCS 1, BCSEC 1 & BIT 1 10/30/2023
Data Types
• To process solutions, the computer must have data.
– Data are unorganized facts.
• They go into the computer as input and are processed by the program.
• What is returned to the user is output, or information.
• The data the computer uses are of many different types.
Problem Solving Concepts for the Computer
– Computers must be told the data type of each variable or constant.
Data Types
4
BCS 1, BCSEC 1 & BIT 1 10/30/2023
5
BCS 1, BCSEC 1 & BIT 1 10/30/2023
Operators
• Operators are the data connectors within expressions and
equations.
– They tell the computer how to process the data.
– Types of operators used in calculations and problem solving
• Mathematical operators
Problem Solving Concepts for the Computer
• Relational operators
Operators • Logical operators.
– Without these operators very little processing can be done.
6
BCS 1, BCSEC 1 & BIT 1 10/30/2023
Operators Operators
• The operand and the resultant are two concepts related to the operator.
– Operands
• Data that the operator connects and processes.
– Resultant
• Answer that results when the operation is completed.
– For example, in the expression 5 + 7
• The + is the operator
• 5 and 7 are the operands
• 12 is the resultant.
– Operands can be constants or variables.
– The data type of the operands and the resultant depends on the operator.
CSU07101/ITU07101/CYU07106 - Problem Solving CSU07101/ITU07101/CYU07106 - Problem Solving
25 26
Techniques Techniques
Operators
7
BCS 1, BCSEC 1 & BIT 1 10/30/2023
Summary
8
BCS 1, BCSEC 1 & BIT 1 10/30/2023
Summary
• Introduction
• Constants and Variables
• Data Types
• Operators
• Expressions and Equations