Previous Lesson Review
-two major functions of the operating system
-Multi-Channel technology
I. Network Fundamentals
-1. Internet Protocol---is the standard of computer network communication
-2. Network refers to the computer that is connected to the computer by physical connection media (network devices
Two. OSI layer Seven Protocol
-Five layer for application transport network data Link physics
2.1-Ethernet protocol specifies that an electrical signal is a set of data frames based on MAC address communication only for LAN communication
-Each set of frames is divided into header head and data date two
-Header length is a fixed type and address of the containing data
-You must have a MAC address on the network card to access the Internet
2.2-The Internet is made up of countless small LANs
-Network layer for IPv4 to identify in which LAN subnet mask
-172.16.10.1 255.255.255.0
-Gateway is the communication interface gateway of the LAN and the gateway communicates with the routing protocol.
2.3-arp protocol Origin: In the LAN to get the other host's MAC address
-First differentiate your subnet by IP address and subnet mask to analyze whether the IP address is on the same network and then contract (the package that you want to get the MAC address of the other party)
Three. Summary focus-Transport Layer TCP/UDP Port Protocol 0-65535 1024 It's all your own. Software ports
.....
....
....
Python Basics
Classification and definition of 1.-programming language
2.-high-level language and computer communication (translation and compilation)
3.-compiled: Write a translation once and let the computer run.
C language requires compiler GCC,GLIBC
Low development efficiency and high operating efficiency
4.-Explanatory type:
The Python language requires an interpreter CPython
High development efficiency and low operating efficiency
Interpreter: There are a lot of mainstream studies in classification CPython
Homework Today:
Installation of Python2 and Python3 for multi-version coexistence
PS:PIP2 and PIP3 can be used normally
Two write code in Python language, asking for user information: name, age, home address, and then print
For:
#!/usr/bin/env python
#_ *_coding:utf-8_*_
Name = input ("What is your name?")
Age = Input ("What old is You?")
Hometown = input ("Where is your hometown?")
Print ("Hello", Name, "Your is", age, "years old, you came from", hometown)
Three on the basis of the above to make improvements, required to print according to the following format
======egon info======
Name:egon
Age:18
Address:shahe
=====================
For:
#!/usr/bin/env python
#_ *_coding:utf-8_*_
Name = input ("What is your name?") ")
Address = input ("What is your address?")
age = Int (input ("What's Your Age?"))
info = ""
========info to======
Name:{_name}
Address:{_address}
Age:{_age}
". Format (_name=name,
_address=address,
_age=age)
=====================
Print (info)
Choose a title: Old boy's age is 63, ask to make a guess age game
User input age is small hint: too small
The user entered the age of older then prompt: Too big
Users guessed the age of the hint: you get it
For:
#!/usr/bin/env python
#_ *_coding:utf-8_*_
My_age = 63
Count = 0
While Count < 3:
user_input = Int (input ("Input your guess Oldboy Age:"))
if user_input = = My_age:
Print ("Congratulations, you got it!")
Break
Elif User_input < my_age:
Print ("Oops,think bigger!")
Else
Print ("Think smaller!")
Count + = 1 # Each loop counter +1
Else
Print ("Guess how many times you're wrong, you idiot.")
Additional note: The above code needs to be permanently saved
For:
Write to the hard disk and save it as a file.
Tomorrow, the following code:
Name = input ("What is your name?")
Age = Input ("What old is You?")
Hometown = input ("Where is your hometown?")
Print ("Hello", Name, "Your is", age, "years old, you came from", hometown)
Computer Basics Series One: Network Fundamentals and Python Basics (variables and program interactions) July 13 and 14th Class Preview/Essays/Assignments