forked from turingschool-examples/backend_mod_1_prework
-
Notifications
You must be signed in to change notification settings - Fork 176
Alicia Watt #150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
AliciaWatt
wants to merge
10
commits into
turingschool:main
Choose a base branch
from
AliciaWatt:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Alicia Watt #150
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
32ca9e6
Add section 1
AliciaWatt d084480
Add section 2 work
AliciaWatt 5f45cd8
Add section 3 work
AliciaWatt 44627cd
Add section 4 work
AliciaWatt 02951e2
Add final prep work
AliciaWatt 868f6fa
Update README.md
AliciaWatt 7d5f7ff
Update README.md
AliciaWatt d82067c
Update README.md
AliciaWatt bbca9f4
Update README.md
AliciaWatt 28b7e81
Update README.md
AliciaWatt File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| puts "Hello World!" | ||
| puts "Hello Again" | ||
| puts "I like typing this." | ||
| puts "This is fun." | ||
| puts "Yay! Printing." | ||
| puts "I'd much rather you 'not' ." | ||
| puts 'I "said" do not touch this.' |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| # A comment, this is so you can read your program later. | ||
| # Anything after the # is ignored by ruby. | ||
|
|
||
| puts "I could have code like this." # and the comment after is ignored | ||
|
|
||
| #You can also use a comment to "disable" or comment out a piece of code: | ||
| # puts "This won't run." | ||
|
|
||
| puts "This will run." |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| puts "I will now count my chickens:" | ||
|
|
||
| puts "Hens #{25 + 30 / 6}" # adds 25 and 30 then divides by 6 | ||
| puts "Roosters #{100 - 25 * 3 % 4}" # Subtracts 25 from 100 the multiplies by 3 | ||
|
|
||
| puts "Now I will count the eggs:" #string | ||
|
|
||
| puts 3 + 2 + 1 - 5 + 4 % 2 - 1 / 4 + 6 # computation | ||
|
|
||
| puts "Is it true that 3 + 2 < 5 - 7?" # string | ||
|
|
||
| puts 3 + 2 < 5 -7 # < returns false | ||
|
|
||
| puts "What is 3 + 2? #{3 + 2}" # string and computation | ||
| puts "What is 5 - 7? #{5 - 7}" # string and computation | ||
|
|
||
| puts "Oh that's why it's false." # string | ||
|
|
||
| puts "How about some more" # string | ||
|
|
||
| puts "Is it greater? #{5 > -2}" #returns true | ||
| puts "Is it greater or equal? #{5 >= -2}" #returns true | ||
| puts "Is it less or equal? #{5 <= -2}" # returns false |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| cars = 100 # defines number of cars | ||
| space_in_a_car = 4.0 # defines number people that fit in each car | ||
| drivers = 30 # defines number of drivers | ||
| passengers = 90 # defines number of passengers | ||
| cars_not_driven = cars - drivers #computation for inactive cars | ||
| cars_driven = drivers #computation for number of active cars | ||
| carpool_capacity = cars_driven * space_in_a_car # computation for space alotment in cars driven | ||
| average_passengers_per_car = passengers / cars_driven # computation for finding average number of passengers per car driven | ||
|
|
||
|
|
||
| puts "There are #{cars} cars available." | ||
| puts "There are only #{drivers} drivers available." | ||
| puts "There will be #{cars_not_driven} empty cars today." | ||
| puts "We can transport #{carpool_capacity} people today." | ||
| puts "We have #{passengers} to carpool today." | ||
| puts "We need to put about #{average_passengers_per_car} in each car." |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| name = 'Zed A. Shaw' | ||
| age = 35 #not a lie in 2009 | ||
| height = 74 # inches | ||
| weight = 180 # lbs | ||
| eyes = 'Blue' | ||
| teeth = 'White' | ||
| hair = 'Brown' | ||
| height_in_cm = height * 2.54 | ||
| weight_in_km = weight / 2.205 | ||
|
|
||
| puts "Let's talk about my #{name}." | ||
| puts "He's #{height} inches tall." | ||
| puts "He's #{weight} pounds heavy." | ||
| puts "Actually that's not too heavy." | ||
| puts "He's got #{eyes} eyes and #{hair} hair." | ||
| puts "His teeth are usually #{teeth} depending on the coffee." | ||
|
|
||
| puts "If I add #{age}, #{height}, and #{weight} I get #{age + height + weight}. | ||
| " | ||
| puts "He's #{height_in_cm} in centimeters." | ||
| puts "He's #{weight_in_km} in Kilograms." |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| types_of_people = 10 #declaring var | ||
| x = "There are #{types_of_people} types of people." # declaring var | ||
| binary = "binary" # declaring var | ||
| do_not = "don't" # decalring var | ||
| y = "Those who know #{binary} and those who #{do_not}." # string within string | ||
|
|
||
| puts x # prints string | ||
| puts y # prints string | ||
|
|
||
| puts "I said: #{x}." #prints string within string | ||
| puts "I also said: '#{y}'." # prints string within string | ||
|
|
||
| hilarious = false #declare var | ||
| joke_evaluation = "Isn't that joke so funny?! #{hilarious}" #string within string | ||
|
|
||
| puts joke_evaluation #prints string | ||
|
|
||
| w = "This is the left side of..." # declares var | ||
| e = "a string with a right side." # declares var | ||
|
|
||
| puts w + e # prints vars to create long string | ||
| q = 'is this a string' | ||
| puts q |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| print "How old are you? " | ||
| age = gets.chomp | ||
| print "How tall are you? " | ||
| height = gets.chomp | ||
| print "How much do you weigh? " | ||
| weight = gets.chomp | ||
|
|
||
| puts "So, you're #{age} old, #{height} tall and #{weight} heavy." | ||
|
|
||
| print "Whats your sign? " | ||
| horoscope = gets.chomp | ||
| print "Do you believe in it? " | ||
| y_n = gets.chomp | ||
|
|
||
| puts "A #{horoscope} would say #{y_n}!" |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make sure you're using lowercase letters here, so @ARCH_NEMESIS should be @arch_nemisis