Lesson_02_Programming_Basics
Lesson_02_Programming_Basics
with Python
Programming Basics
Learning Objectives
The company must determine what type of software will best meet the given
demand and make use of programming procedures to implement it.
• What is software?
• Why do we need software?
What Is Software ?
Note
Software
• What is software?
Answer: Software is a set of instructions written for the computer to
understand, interpret, and execute.
Application software
Photoshop
Calculator
Microsoft
office • System software
System software Browser
Games • Application software
Operating Utilities
system Hardware
CPU, RAM, I/O devices,
and others
System Software
It is a set of programs that are used to perform a specific task on a system. These are
customized to solve specific types of problems and provide functionalities.
Example
Freeware Shareware
Scenario: You are a data scientist in your organization and have been put
into a project that deals with critical information. While coding for an
application, you hide everything but the necessary information about an item
to simplify it and boost productivity.
In simple terms, you decide to showcase only the data that is relevant and
hide all the other critical and unnecessary data from the user.
OOPs refer to languages that use objects in programming. It aims to implement real-world
entities such as inheritance, information hiding, and polymorphism in programming.
Advantages of OOPs
Inheritance Encapsulation
OOPs concepts
Abstraction Polymorphism
Procedural Programming
Scenario: You are a data scientist in your organization and have been put
into a project that deals with critical information. While coding for an
application, you hide everything but the necessary information about an item
to simplify it and boost productivity.
In simple terms, you decide to showcase only the data that is relevant and
hide all the other critical and unnecessary data from the user.
A program consists of multiple components that interact with each other and have
1 interrelationships. A well-structured program might be complex but not
complicated.
In contrast, a poorly structured program has interfaces that are implicit and
3 difficult to understand, and the division into components is largely arbitrary (or
non-existent.)
Variable declaration
#include<stdio.h>
C
void main(){printf(“Hey Hi!!”);}
#include<iostream>
C++
int main(){cout<<(“Hey Hi!!”; return 0;}
program HelloWorld;
begin
Pascal
writeIn(“Hey Hi!!”);
end
CREATE OR REPLACEPROCEDURE helloworld AS BEGIN
Oracle PL/SQL DBMS_OUTPUT.PUT_LINE(‘HELLO WORLD’);
END;
Syntax in Different Languages
class helloworld{
Java public static void main (String args []) {
System.out.printIn(“Hello World!!”);}}
#!/usr/bin/env perl
use strict;
Perl
use warnings;
print “Hello World”;
Variables
Tools
Control
structures
Syntax
Data
structures
Variables
A variable is a storage location and an associated symbolic name that contains some known
or unknown quantity or information, that is, a value.
Example
• int no;
• string name;
• double amount;
Control structures direct the program's flow depending on a decision, causing it to jump from one
line to another or return a section of code. It can be done using an if-else construct.
Example
It controls the flow of the program structure. When a program runs, a compiler reads and executes
the user program line by line. This is called the top to bottom approach.
Data Structures
Data structures are a way of storing and organizing data in a computer in a way that can be
effectively used. Lists, dictionaries, and arrays are a few examples of data structures.
Example
Syntax defines a set of rules that specify the combinations of symbols that are correctly
structured statements or expressions in that language.
Example
Symbols, characters, and words in a programming language have special meanings and rules to
enable the compiler to understand the instructions.
Tools
Tools in programming are the editors that help the user code quickly and efficiently.
Example
• Eclipse
• Atom
• Jupyter
• Microsoft Visual Studio
There are various IDEs (Integrated development environments) available for coding based on the
technology and language.
Key Takeaways
A. Command language
B. High-level language
C. Assembly language
D. Machine language
Knowledge
Check
The language understood by a computer without translation is called ____________
1
A. Command language
B. High-level language
C. Assembly language
D. Machine language
A. System software
B. Application software
C. Device driver
D. Customized software
Knowledge
Check
Which of the following software defines an operating system and utility program?
2
A. System software
B. Application software
C. Device driver
D. Customized software
A. Inheritance
B. Abstraction
C. Polymorphism
D. Encapsulation
Knowledge
Check
Which feature of OOPs indicates code reusability?
3
A. Inheritance
B. Abstraction
C. Polymorphism
D. Encapsulation