TCP/IP + IF-elif-else-1
Good Morning boys
In today's session also, we will divide the class in two parts.
In the first half , we will learn about TCP/IP PROTOCOL used by computers and in the second half, we will further look at the detailed working of IF-elif-else Decision Construct, as requested by few students.
--------------------------------------------------------------------
----------------------------------------------------------------------
By the end of today's session, you will be able to
In today's session also, we will divide the class in two parts.
In the first half , we will learn about TCP/IP PROTOCOL used by computers and in the second half, we will further look at the detailed working of IF-elif-else Decision Construct, as requested by few students.
--------------------------------------------------------------------
By the end of today's session, you will be able to
- Understand the need for protocols while communicating on the internet.
- Understand the method of communication using TCP/IP Protocol.
- Understand the detailed working of the TCP and IP protocols.
What is a Protocol ?
A protocol is a set of rules that govern how systems communicate. For networking they govern how data is transferred from one system to another.
What is a Protocol Suite ?
A protocol suite is a collection of protocols that are designed to work together.
Lets take an example of a parcel service between two offices.
The task is simple – send parcels between people in each office.
We will divide the task into two distinct processes as follows:
at the sending end
- Take a package, wrap it and address it.
- Send it to the destination
at the receiving end
- Receive the package
- Deliver it to the recipient
Typically you would have an internal mail man that:
- Collects the parcels from the senders and takes then to a mail dispatch room.
- The parcels are placed in a van by the dispatcher and then driven to the remote office.
At the remote office
- The parcels are received by the dispatcher and placed into a tray for the mail man
- The mail man collects the parcels and delivers them to the recipients,
Below is a simple diagram to illustrate the process:
What do these protocols do?
At their most basic level, these protocols establish the rules for how information passes through the Internet.
Without these rules, you would need direct connections to other computers to access the information they hold.
You'd also need both your computer and the target computer to understand a common language.
You've probably heard of IP addresses. These addresses follow the Internet protocol. Each device connected to the Internet has an IP address. This is how one machine can find another through the massive network.
The entire Internet Protocol suite -- a set of rules and procedures -- is commonly referred to as TCP/IP. TCP and IP are the two main protocols, though others are included in the suite.
TCP/IP requires little central management, and it is designed to make networks reliable, with the ability to recover automatically from the failure of any device on the network. TCP/IP uses the client-server model of communication in which a user or machine (a client) is provided a service (like sending a webpage) by another computer (a server) in the network.
The two main protocols in the Internet Protocol suite serve specific functions.
TCP defines how applications can create channels of communication across a network. It also manages how a message is assembled into smaller packets before they are then transmitted over the internet and reassembled in the right order at the destination address.
IP defines how to address and route each packet to make sure it reaches the right destination. Each gateway computer on the network checks this IP address to determine where to forward the message.
Common protocols of TCP/IP include the following:
- HTTP (Hyper Text Transfer Protocol) handles the communication between a web server and a web browser.
- HTTPS (Secure HTTP) handles secure communication between a web server and a web browser.
- FTP (File Transfer Protocol) handles transmission of files between computers.
--------------------------------------------------------------------------------------------------
PYTHON PROGRAMING
#PROGRAM TO FIND LARGEST OF TWO NUMBERS
num1=int(input("Enter the first number-"))
num2=int(input("Enter the Second number-"))
if(num1>num2):
print(num1," is greater than ",num2)
else:
print(num2," is greater than "num1)
-----------------------------------------------------------------------------------------------
#PROGRAM TO FIND LARGEST OF TWO NUMBERS
num1=int(input("Enter the first number-"))
num2=int(input("Enter the Second number-"))
if(num1>num2):
print(num1," is greater than ",num2)
elif(num2>num1):
print(num2," is greater than "num1)
else:
print(num1," = ",num2)

Good morning mam
ReplyDeleteSahil
good morning ma'am
ReplyDelete-Artham
good morning maam
ReplyDeleterahul
Good morning ma'am
ReplyDelete-Brian
Good morning mam
ReplyDeleteGood morning Ma'am
ReplyDeleteGood morning ma'am
ReplyDelete-Geet