What is a Computer System - Copy
What is a Computer System - Copy
Ans - A computer system is a combination of hardware software, data and users that work together to perform
various tasks and processes . It consists of several components :
1. Hardware : This includes physical components like the CPU (Central Processing Unit), Memory (RAM), Storage
Devices, Hard Drive and SSD’s, Input Devices, Output Devices and network equipment .
2. Software : These are the programs and application that instruct the hardware on how to perform task . This
includes the hardware on how to perform task . This includes the operating system(like: Mac OS, Linus, Windows)
Drivers, Utility and application (like: Word processor, Web Browsers and Games)
3. Data : Information in the form of files, document, data bases or any other type of content that the computer
system processes and manipulates .
4. Users : People who interact with the computer system, providing input and receiving output utilizing its capability
to perform task or achieve goal .
Q2. What is a computer software ?
Ans - Software is a collection of instruction, data or computer programs that are used to run machines and carry out
particular activity . Computer software refers to a set of instruction, program or data used to operate computer and
execute specific task it is the intangible aspect of computer system that tells hardware how to function and what task
to perform .
Q3. Define the following terms :
a. Software Instruction : Software instruction refers to the specific commands or directions given to the
computer or an application to perform a particular task or operation. These instructions are written in a
programing language understood by the computer. Each instruction is a line of code that tells the
computer what to do, such as perform calculation, reading or writing data, making decision based on
certain condition (If-else statement), looping, through set of actions multiple times(loops), or calling
predefine function to execute specific operations .
b. Computer Program : A computer program is a set of instruction written in a specific programming
language.
A computer program can be simple as a set of instruction performing a single function or as complex as a
large-scale application handling numerous tasks and interacting with users or other systems.
Software
Software is a set of programs that allows the users to perform a well-defined function or some specified task.
Types of Software:
Software are broadly classified into two types that is system software and application software.
System Software: It is a computer software that help user to run a computer hardware or software and manages the
interaction between them. It directly operates computer hardware and provides basic functionalities to the user as
well as other software to operate smoothly.
Application Software: It is a program/software are and user computer programs developed primarily to provide
specific functionalities to the user. It performs special function or provides function that are much more than the
basic operation of the computer is known as application software.
What is Flow Chart?
Flow Chart is a graphical representation of sequence of steps or actions within an algorithms or program it uses
different shapes and symbols to represent different elements such as start and end points, processes decisions,
inputs, outputs and loops.
Basic symbol used in flow chart design :
S.N Name Shapes Use and Description
o.
1. The Oval symbol indicates start, stop and halt in a
Terminal program logical flow. A pause/halt generally used in
program logic under some error condition. Terminal is the
first and the last symbol in flowchart.
2. Input A parallelogram denotes any function of input/output
Or type of program, instruction that takes input from devices
Output are indicated with parallelogram in a flow chart.
3. A box represents arithmetic instruction.
Processing
Start
Input a, b=1, c
Is
b<11
c= a × b
Print c
b= b+1
End
Algorithms
The word Algorithm means “A set of finite rules or instruction to be followed in calculation or other problem solving
operation.”
OR
“A procedure for solving a mathematical problem in a finite number of steps that frequently involves recursive
operations.”
Use of Algorithm
Some Keys areas where algorithms used are used include:
1. Computer
2. Mathematics
3. Operating Research
4. Artificial Intelligence
5. Data Science
What Is Python?
Python is a high level, general purpose and very popular programing language. Python is being used in web
development, machine learning, and application along with all cutting edge technology in software industry.
Python is being used by all most all tech giant companies like Google, Amazon, Facebook, Instagram, Dropbox, Uber
etc.
It was created by Guido Van Rossum in 1991 and further developed by python software foundation.
Features of Python
1. Interpreted: Python convert source code into an immediate form called byte codes which is then translate into
native language of specific computer to run it.
2. Platform Independent: Python Program can be developed and executed on multiple operating system platforms.
3. Free and Open Source: Redistributable
4. High Level Language: In python no need to take care about low level detail such as managing the memory used
by the programing.
5. Simple: Closer to English language easy to learn.
More emphasis on the solution to the problem rather than the syntax.
6. Embeddable: Python can be used within C/C++ program to give scripting capabilities for the programs users.
7. Robust: Exceptional handling features
Memory management is technical is inbuilt.
8. Rich Library Support: The Python standard library is very vast.
Python Syntax
Python Indentation: It refers to the spaces at the beginning of a code line.
Python uses indentation to indicate a block of code.
Example: if a>b:
print (“a is greater”)
else:
print(“b is greater”)
Indentation
Python Keywords
Keywords are predefined and reserve words used in python programming that have special meaning to the
compiler.
We cannot use a keyword as a variable name, function name, or any other identifier.
They are used to define the syntax and structure of python language
All Keyword accept True, False and None are in lower case and they must be written as they are.
Python Identifier
Identifier are the name given to variable, classes, method etc.
For Example: language= “python”
Here language is a variable ‘An identifier’ which holds the value python.
NOTE
Python is a case sensitive language. This means, Count and count are not the same.
Always give the identifier name that makes sense.
Multiple words can be separated using underscore.
Python Comments
Comments are hints that we add to our code to make sense.
When executing code by python, interpreter ignore comments.
Multiline Line Comment: Python doesn’t have dedicated multi-line comment syntax like other programing languages
like: C++ and Java.
We can use multiline strings as comments like:
“’ This program takes an input from the users and print it ‘”
name= input(“Enter name”)
print(name)
NOTE
Python is a type inferred language so you don’t to explicitly define the variable type.
print(site_name)
Output
programiz.pro
apple.com
Example: Assigning multiple value to multiple variable.
a, b, c = 5, 3.2, 'Hello'
print(a) # prints 5
print(b) # prints 3.2
print(c) # prints Hello
Output
5
3.2
Hello
If we want to assign the same value to multiple variables at once, we can do this as:
site1 = site2 = 'programiz.com'
Python Constants
A constant is a special type of variable whose value cannot be change.
In python, constants are usually and assigned in a module.
Create a constant.py:
# declare constants
PI = 3.14
GRAVITY = 9.8
Create a main.py:
Python Literals
Literals are the representation of fixed values in a program. They can be numbers, characters, or strings etc.
For Example: ‘Hello World’, 40, 12.5, ‘B’.
Literals often used to assign values to variable or constant.
For Example: name= ‘Ramesh’
In the above expression name is a variable ‘Ramesh’ is a literal