Beruflich Dokumente
Kultur Dokumente
Lesson 5
www.teachingcomputing.com
Series Overview
Information/Theory/Discuss
Task (Code provided)
Challenge (DIY!)
Suggested Project/HW
*Please note that each lesson is not bound to a specific time (so it can be taken at your own pace)
Things to remember #1
Print() is quite useful if you want to print output on the next line!
OUTPUT
Things to remember #2
'end' is the special character at the end of the print statement,
which is by default the newline '\n. It can be used to insert a
character of your choice too.
OUTPU
T
Solve it sequentially, and then think about what you need to do to use a loop to
do the same thing!
Avoid While Loops for these set of challenges.
Feel free to refer to previous power points and slides in this presentation!
Note: The challenges get harder as they go on. If you get to the end
and solve them yourself .
VERY WELL DONE!
?
Screenshot your solution in the space above!
Desired output
OUTPU
T
Solution1:
?
Screenshot your solution in the space above!
Desired output
OUTPU
T
Solution 2:
?
Screenshot your solution in the space above!
Desired output
Solution 3:
?
Screenshot your solution in the space above!
Desired output
Solution 4:
?
Screenshot your solution in the space above!
Desired output
?
Screenshot your solution in the space above!
Desired output
Difficult!
?
Screenshot your solution in the space above!
Desired output
Difficult!
?
Screenshot your solution in the space above!
Solution 8:
Testing a Program
Testing
Evaluation
What is Testing?
Testing is a stage of the systems life cycle which is essential in the development
process.
Testing also eliminates the possibility of any bugs or errors that may emerge on
use of the system/program
There are various methods of testing and different stages of testing too!
k
s
a
T
Using the table below, give 3 separate test cases for testing
the program
Input Data
Reason for
Test
Expected
Result
k
s
a
T
Using the table below, give 3 separate test cases for testing the program
Input Data
Expected Result
2,3
Normal Data
Test (can the
program handle
normal data)
Real Numbers
can it handle?
Borderline
Values
Invalid Values
2.4, 2.1
0,100
-1, 101
4.6
100
Ans
s
wer
Using the table below, give 3 separate test cases for testing the program
Input Data
Expected Result
2,3
Normal Data
Test (can the
program handle
normal data)
Real Numbers
can it handle?
Borderline
Values
Invalid Values
2.4, 2.1
0,100
-1, 101
4.6
100
Ans
s
wer
Using the table below, give 3 separate test cases for testing the program
Input Data
Expected Result
2,3
Normal Data
Test (can the
program handle
normal data)
Real Numbers
can it handle?
Borderline
Values
Invalid Values
2.4, 2.1
0,100
-1, 101
4.6
100
Ans
s
wer
Using the table below, give 3 separate test cases for testing the program
Input Data
Expected Result
2,3
Normal Data
Test (can the
program handle
normal data)
Real Numbers
can it handle?
Borderline
Values
Invalid Values
2.4, 2.1
0,100
-1, 101
4.6
100
Ans
s
wer
Using the table below, give 3 separate test cases for testing the program
Input Data
Expected Result
2,3
Normal Data
Test (can the
program handle
normal data)
Real Numbers
can it handle?
Borderline
Values
Invalid Values
2.4, 2.1
0,100
-1, 101
4.6
100
1. Normal Data
2. Extreme Data
3. Boundary or Borderline Data
4. Erroneous or Invalid Data
Acceptance
Black Box
Beta Tests