Documente Academic
Documente Profesional
Documente Cultură
1.0 Introduction
Computers and computer software have become a part of the fabric of every day life.
They are great as long as they are working. We give little thought to the processes and
programs running behind the scenes to keep them functioning effectively.
Provide file
management and Updating operating
Control a network Administer security
other device or system software
media-related tasks
Page 1
Operating System Functions
Cold Boot
•Turning on a computer that has been powered off completely
Warm Boot
•Using the operating system to restart a computer
Page 2
Example: How an operating system interacts with a user, an application and
hardware
OS
Windows Google
Windows
Server Android
Mac OS X
OS X Apple iOS
Server
Windows
UNIX UNIX
Phone
Linux Linux
Chrome OS
Page 3
A desktop operating system is a complete operating system that works on desktops,
laptops, and some tablets. It is also known as stand-alone operating systems.
• Windows – most widely used; from Microsoft Corporation.
• The Macintosh operating system – Mac OS has earned a reputation for its ease
of use.
• UNIX is a multitasking operating system developed in the early 1970s.
• Linux is a popular, multitasking UNIX-based operating system.
• Chrome OS is a Linux-based operating system designed to work primarily with
web apps.
o Focuses on Internet connectivity and cloud computing
o Speed is determined by the speed of the Internet
Android
iOS
•iOS, developed by Apple, is a proprietary mobile operating system specifically made for
Apple’s mobile devices.
Windows Phone
Page 4
Example of Commands for CLI
Page 5
• Specialized programs to make computing easier
• Most essential utilities
– Troubleshooting or diagnostic programs
• Recognizes and correct problems
– Antivirus programs
• Guard your computer against viruses
– Backup programs
• Copies of files to restore if necessary
– File compression programs
• Reduces the size of files for more efficient storage
There are stand-alone utility programs offer improvements over those features built-in
to the operating system. Functions include protecting against viruses, securing a
computer from unauthorized access and compressing files. Examples of stand-alone
utility programs: Antivirus programs, personal firewall and file compression
Page 6
A disk defragmenter reorganizes the files and unused space on a computer’s hard disk
so that the operating system accesses data more quickly and programs run faster.
Page 7
System Software vs Application Software
Page 8
System development should follow three general guidelines:
• Group activities or tasks into phases
• Involve users
• Define standards
Page 9
Debugging
Debugging is part of the software testing process. It is the process of finding and
resolving of defects or problem within the program.
Programming Languages
We may communicate with computers through low level and high level programming
languages. A programming language is a set of words that enable a software
developer to communicate instructions to a computer or mobile device.
Page 10
o Visual Studio is Microsoft’s suite of object-oriented application development
tools that assists software developers in building programs and apps for
Windows or any operating system that supports the Microsoft .NET Framework.
Algorithm
Algorithm = sequence of instructions or steps to complete a task
Example:
Page 11
Algorithm and computational thinking are both independent of the programming
language we choose to implement the program.
Page 12
Activity 1: Computational Thinking with Scratch
Go to https://scratch.mit.edu/
Page 13
Q2: Using Scratch program, draw a hexagon.
Q4: How could you reduce the instructions in the code but still produce the same
output as in Q3?
Page 14
Algorithms
• Pseudocode or Flow Charts are often used to show the structure and functionality
of a program.
• In Pseudocode the individual actions to be carried out by the program are stated in
plain English.
• They can be visually represented in a Flow Chart using symbols and arrows.
Page 15
Activity 2: Flowchart
Page 16
Basic Programming Constructs/Concepts
• Sequence
o a sequence or set of instructions put in order
• Selection
o IF Statements and CASE Statements
• Iteration
o Looping
Page 17
Arduino IDE
Arduino UNO requires Arduino software to run. You can download the software from
Arduino website (https://www.arduino.cc/en/main/software).
Arduino IDE is compatible with Windows, Mac OS X and Linux. You just need to
choose the appropriate operating system installation package for your computer. If you
are a Windows user, it is recommended that you choose Windows ZIP file for non
admin install.
Or
Page 18
Activity 4: Interpret the Arduino Code
void setup()
{
pinMode(8, OUTPUT);
}
void loop()
{
digitalWrite(8, HIGH);
delay(2000);
digitalWrite(8, LOW);
delay(2000);
}
Project 1: Light up your first LED: Write the code for Arduino program where the
LED connected to pin 9 will turn on for 1 second and turn off for 1 second.
Tip: If the connection to Arduino is disconnected, de-select/select the COM port or unplug and re-plug
the USB cable.
Arduino code:
void setup()
{
pinMode(9, OUTPUT); //Set pin 9 as output
}
void loop()
{
Page 19
digitalWrite(9, HIGH); //HIGH means on the LED
delay(1000);
digitalWrite(9, LOW); //LOW means off the LED
delay(1000);
}
Arduino code:
void setup()
{
pinMode(2, OUTPUT);
pinMode(4, OUTPUT);
pinMode(6, OUTPUT);
}
void loop()
{
digitalWrite(6, HIGH); //Green light is on
digitalWrite(4, LOW);
digitalWrite(2, LOW);
delay(5000);
digitalWrite(6, LOW);
digitalWrite(4, HIGH); //Yellow light is on
digitalWrite(2, LOW);
delay(3000);
Page 20
digitalWrite(6, LOW);
digitalWrite(4, LOW);
digitalWrite(2, HIGH); //Red light is on
delay(5000);
}
Project 3: Countdown Light: Create a countdown light that off LEDs one by one in
a sequence.
Arduino code:
void setup()
{
pinMode(2, OUTPUT);
pinMode(4, OUTPUT);
pinMode(6, OUTPUT);
pinMode(8, OUTPUT);
pinMode(10, OUTPUT);
}
void loop()
{
digitalWrite(2, HIGH);
digitalWrite(4, HIGH);
digitalWrite(6, HIGH);
digitalWrite(8, HIGH);
digitalWrite(10, HIGH);
Page 21
delay(1000);
digitalWrite(2, HIGH);
digitalWrite(4, HIGH);
digitalWrite(6, HIGH);
digitalWrite(8, HIGH);
digitalWrite(10, LOW);
delay(1000);
digitalWrite(2, HIGH);
digitalWrite(4, HIGH);
digitalWrite(6, HIGH);
digitalWrite(8, LOW);
digitalWrite(10, LOW);
delay(1000);
digitalWrite(2, HIGH);
digitalWrite(4, HIGH);
digitalWrite(6, LOW);
digitalWrite(8, LOW);
digitalWrite(10, LOW);
delay(1000);
digitalWrite(2, HIGH);
digitalWrite(4, LOW);
digitalWrite(6, LOW);
digitalWrite(8, LOW);
digitalWrite(10, LOW);
delay(1000);
digitalWrite(2, LOW);
digitalWrite(4, LOW);
digitalWrite(6, LOW);
digitalWrite(8, LOW);
digitalWrite(10, LOW);
delay(1000);
}
Page 22
Project 4: Chaser Light: Create a chaser light with one-direction running pattern.
Arduino code:
void setup()
{
pinMode(2, OUTPUT);
pinMode(4, OUTPUT);
pinMode(6, OUTPUT);
pinMode(8, OUTPUT);
pinMode(10, OUTPUT);
}
void loop()
{
digitalWrite(2, HIGH);
delay(50);
digitalWrite(2, LOW);
digitalWrite(4, HIGH);
delay(50);
digitalWrite(2, LOW);
digitalWrite(4, LOW);
digitalWrite(6, HIGH);
delay(50);
digitalWrite(2, LOW);
Page 23
digitalWrite(4, LOW);
digitalWrite(6, LOW);
digitalWrite(8, HIGH);
delay(50);
digitalWrite(2, LOW);
digitalWrite(4, LOW);
digitalWrite(6, LOW);
digitalWrite(8, LOW);
digitalWrite(10, HIGH);
delay(50);
digitalWrite(2, LOW);
digitalWrite(4, LOW);
digitalWrite(6, LOW);
digitalWrite(8, LOW);
digitalWrite(10, LOW);
delay(50);
}
Do you ever think of how to create a game? Let’s code your game!
Go to https://studio.code.org/flappy/1
Watch the video and try out to code for “Flappy Bird” game.
Page 24
Page 25
Activity 8: Animation with Scratch – Pong Game
• Create “Rock Band” project. Follow the instructions given in Rock Band pdf file.
Page 26
Tutorial 3
7. Disk defragmenter is one of the utility programs. Explain the purpose of disk
defragmenter. (2 marks)
End of Chapter 3
Page 27