This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Swift- Programming Language | |
Swift is apples new rendition of a modern programming Language. It is an object orientated Language and element’s from JavaScript, C++, ruby, and many others. | |
Using swift and xcode gives you access to auto complete methods, and a huge array of development tools at your fingertips. | |
This will be a short introduction to they syntax of the Language. | |
- Declaring a variable | |
Any variable described outside the 'general' function is a golbal variable. | |
must always like Javascript place 'var' infront of variable name | |
-Delcaring Structures |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Assignment | |
For this Lab you will be making HTTP requests in your terminal using curl and scavenging for data in the response you get back.curl is short for "Client for URL's" and is a tool that allows us to make HTTP requests in our terminal. | |
________________________________________ | |
Phase 1: Make a GET request to google | |
In terminal: | |
curl -v https://www.google.com | |
Find your response header | |
1. What status did you get back? | |
HTTP/1.1 200 OK | |
2. What content-type did you get back? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def temp_conversion | |
puts "Please enter tempature" | |
temp = gets.chomp | |
puts "Type 1 to convert from Celsius to Fahrenheit" | |
puts "Type 2 to convert from Fahrenheit to Celsius" | |
type = gets.chomp | |
if type == 1 | |
temp = temp.to_f - 32 | |
temp = temp * 5 | |
temp = temp / 9 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#tempature Converter | |
def temp_conv(var) | |
end |