Hack My Planet
Day 12
Python Review
- For loops
- Functions
- Parameters
- White space
- Scope
- Return
Function Review
- Write a function called practice_function() that takes in a number as a parameter. If the number is less than 50, print the value. If the number is greater than 50 but less than 1000, print a message. If the number is any other value, return the number, then print it. Call the function for three different values: 5, 50, and 200.
- Write a function called describeCity() that accepts the name of a city and its country as parameters. The function should return a simple sentence (for example: "Honolulu is in the USA"). Call your function for three different cities, store them in a list, and print the items in the list separately.
def function(parameter):
# code goes here
for variable in list:
# code goes here
list = [item1, item2, ... ]
# to add an item to a list:
list.append(item)
VPN Proxy
- Open Firefox
- Click on the 3 lines in the upper right
- Click Preferences > Advanced > Network > Settings...
- Set Manual proxy configuration
- Choose SOCKS v5
- Check Remote DNS
- for SOCKS Host: type localhost
- Port: 45xx
- Click OK
- Open your terminal
- ssh -D 45xx -p 22222 dni@mazarinetech.com
- I'll type in the password
IoT
- Internet of Things
- How the internet works
- IP Address
- What's the difference between internet and world wide web?
- How we connect to the internet
- Servers, sockets, and ports
Servers
- What is a server?
- Client/server interactions
- Ports
Sockets
- What is a socket?
- How they work
Magic Eight Ball
https://github.com/junior-devleague/magic-eight-ball-socket/tree/step1
- Click the green button saying "Clone or download"
- Click on "Download ZIP"
- Select "Save File' then click OK
Hack My Planet Intro to Internet & Magic 8 Ball
By jtheadland
Hack My Planet Intro to Internet & Magic 8 Ball
- 561