-
Notifications
You must be signed in to change notification settings - Fork 65
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
Taryn Orlemann #69
Open
torlemann
wants to merge
18
commits into
turingschool:main
Choose a base branch
from
torlemann: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
Taryn Orlemann #69
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
759d307
Add strings.rb
torlemann dbaed68
numbers.rb
torlemann bf5a80c
Add Section 1
torlemann b2d9805
Add Section 2 work
torlemann 6b4853f
Add section3 practice
torlemann f7df4ea
Add upated arrays work
torlemann cee332f
Add hashes and reflection
torlemann ae49982
Add reflections
torlemann d355b7d
Add ex31 refactor
torlemann 9bce6b6
Update README.md
torlemann 8d80cd2
Update README.md
torlemann 49752c0
Update README.md
torlemann ee06548
Update README.md
torlemann 22b23f9
Create letter_to_instructors.md
torlemann 5af4d10
Update README.md
torlemann ea85910
Update README.md
torlemann 1cc09db
Update README.md
torlemann b76fdfd
Update README.md
torlemann 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 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 @@ | ||
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.' | ||
puts "Another line." | ||
#puts "You're not gonna see this line!" |
This file contains 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,24 @@ | ||
#line 2 will print the string | ||
puts "I will now count my chickens:" | ||
#lines 4 and 5 will print the text and run the maths in the brackets | ||
puts "Hens #{25.0 + 30.0 / 6.0}" | ||
puts "Roosters #{100.0 - 25.0 * 3.0 % 4.0}" | ||
#line 7 will print the string | ||
puts "Now I will count the eggs:" | ||
#line 9 will print the result of the maths | ||
puts 3.0 + 2.0 + 1.0 - 5.0 + 4.0 % 2.0 - 1.0 / 4.0 + 6.0 | ||
#line 11 will print the string | ||
puts "Is it true that 3 + 2 < 5 - 7?" | ||
#line 13 will print the result of the boolean | ||
puts 3.0 + 2.0 < 5.0 - 7.0 | ||
#lines 15 and 16 will print the text and run the maths in the brackets | ||
puts "What is 3 + 2? #{3.0 + 2.0}" | ||
puts "What is 5 - 7? #{5.0 - 7.0}" | ||
#line 18 will print the string | ||
puts "Oh, that's why it's false." | ||
#line 20 will print the string | ||
puts "How about some more." | ||
#lines 22 23 and 24 will print the text and run the maths in the brackets | ||
puts "Is it greater? #{5.0 > -2.0}" | ||
puts "Is it greater or equal? #{5.0 >= -2.0}" | ||
puts "Is it less or equal? #{5.0 <= -2.0}" |
This file contains 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,19 @@ | ||
#lines 2 through 5 will assign values to the variables | ||
cars = 100 | ||
space_in_a_car = 4.0 | ||
drivers = 30 | ||
passengers = 90 | ||
#lines 7 through 10 will assign the result of maths performed with the variables we assigned in the above lines to more variables | ||
cars_not_driven = cars - drivers | ||
cars_driven = drivers | ||
carpool_capacity = cars_driven * space_in_a_car | ||
average_passengers_per_car = passengers / cars_driven | ||
|
||
|
||
#lines 14 thourgh 19 will print strings that include out maths results | ||
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 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,19 @@ | ||
name = 'Zed A. Shaw' | ||
age = 35 # not a lie in 2009 | ||
height = 74 # inches | ||
weight = 180 # lbs | ||
eyes = 'Blue' | ||
teeth = 'White' | ||
hair = 'Brown' | ||
|
||
puts "Let's talk about #{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." | ||
|
||
# this line is tricky, try to get it exactly right | ||
puts "If I add #{age}, #{height}, and #{weight} I get #{age + height + weight}." | ||
puts "His height in centimeters is #{height * 2.54}." | ||
puts "His weight in kilograms is approximately #{weight / 2.205}." |
This file contains 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,24 @@ | ||
# assinging variables | ||
types_of_people = 10 | ||
#assigning and string and a variable to a variable | ||
x = "There are #{types_of_people} types of people in the world." | ||
binary = "binary" | ||
do_not = "don't" | ||
y = "Those who know #{binary} and those who #{do_not}." | ||
#prints the variables | ||
puts x | ||
puts y | ||
|
||
puts "I said: #{x}." | ||
puts "I also said: '#{y}'." | ||
#assigning boolean to a variable | ||
hilarious = false | ||
#assigning hilarious to another new variable | ||
joke_evaluation = "Isn't that joke so funny?! #{hilarious}" | ||
|
||
puts joke_evaluation | ||
|
||
w = "This is the left side of..." | ||
e= "a string with a right side." | ||
#concatinating variables | ||
puts w + e |
This file contains 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 "What's your favorite place to take a vacation? " | ||
vaca = gets.chomp | ||
print "What's your favorite thing to do there? " | ||
fav = gets.chomp | ||
|
||
puts "So, you like to #{fav} when you go to #{vaca}. " |
This file contains 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 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 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 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 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 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 |
---|---|---|
@@ -1,60 +1,75 @@ | ||
# In the below exercises, write code that achieves | ||
# the desired result. To check your work, run this | ||
# file by entering the following command in your terminal: | ||
# file by entering the following command in your terminal: | ||
# `ruby section1/exercises/variables.rb` | ||
|
||
# Example: Write code that saves your name to a variable and | ||
# prints what that variable holds to the terminal: | ||
name = "Harry Potter" | ||
p name | ||
name = "Taryn O" | ||
puts name | ||
|
||
# Write code that saves the string 'Dobby' to a variable and | ||
# prints what that variable holds to the terminal: | ||
house_elf = "Dobby" | ||
# YOUR CODE HERE | ||
puts house_elf | ||
|
||
# Write code that saves the string 'Harry Potter must not return to Hogwarts!' | ||
# and prints what that variable holds to the terminal: | ||
# YOUR CODE HERE | ||
quote = "Harry Potter must not return to Hogwarts!" | ||
puts quote | ||
|
||
# Write code that adds 2 to the `students` variable and | ||
# prints the result: | ||
students = 22 | ||
# YOUR CODE HERE | ||
p students | ||
students = students + 2 | ||
puts students | ||
|
||
# Write code that subracts 2 from the `students` variable and | ||
# prints the result: | ||
# YOUR CODE HERE | ||
p students | ||
students = students - 2 | ||
puts students | ||
|
||
|
||
# YOU DO: | ||
# Declare three variables, named `first_name`, `is_hungry` and `number_of_pets`. | ||
# Declare three variables, named `first_name`, `is_hungry` and `number_of_pets`. | ||
# Store the appropriate data types in each. | ||
# print all three variables to the terminal. | ||
first_name = "Taryn" | ||
is_hungry = true | ||
number_of_pets = 0 | ||
puts first_name | ||
puts is_hungry | ||
puts number_of_pets | ||
|
||
# IN WORDS: | ||
# How did you decide to use the data type you did for each of the three variables above? | ||
# How did you decide to use the data type you did for each of the three variables above? | ||
|
||
# Explain. | ||
# I used a string for first_name because the value is a word; a boolean for | ||
#is_hungry because logic dictates the value be a true or false statement based | ||
#on the variable's name; and an integer for number_of_pets because logic asks | ||
#for a number, and i didn't want to use the string "zero" | ||
|
||
|
||
# YOU DO: | ||
# Re-assign the values to the three variables from the previous challenge to | ||
# different values (but same data type). | ||
# Print all three variables to the terminal. | ||
|
||
first_name = "My first name is Taryn" | ||
is_hungry = false | ||
number_of_pets = 0.0 | ||
puts first_name | ||
puts is_hungry | ||
print number_of_pets | ||
|
||
# YOU DO: | ||
# Using the variables below, print the total number of snacks to the terminal: | ||
healthy_snacks = 6; | ||
junk_food_snacks = 8; | ||
|
||
puts healthy_snacks + junk_food_snacks | ||
|
||
#------------------- | ||
# FINAL CHECK | ||
#------------------- | ||
|
||
# Did you run this file in your terminal to make sure everything printed out | ||
# to the terminal as you would expect? | ||
# to the terminal as you would expect? |
This file contains 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 @@ | ||
take1 = 'I need to improve my faculties for time management and focus.' | ||
take2 = 'Git is a little confusing right now, but I'm not deterred!' | ||
|
||
strat1 = 'I will review my notes and materials within 48 hours of writing them to solidify my understanding.' | ||
strat2 = 'I will read code backwards and outloud to help me find mistakes.' | ||
|
||
shout = 'Thanks Amy! You've been a great help getting me set up.' |
This file contains 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 |
---|---|---|
@@ -1,19 +1,29 @@ | ||
## Section 1 Reflection | ||
|
||
1. Regarding the blog posts in Part A, how do you feel about asking questions? Do you tend to ask them too soon, or wait too long, or somewhere in between? | ||
i feel pretty at ease with asking questions. in second grade, my teacher nicknamed me the "Queen of Questions". Perhaps I ask questions too soon more often than waiting too long (at work anyway - my personal life is another matter) | ||
|
||
2. How would you print the string `"Hello World!"` to the terminal? | ||
puts "Hello World!" in my .rb file, save file, call file in terminal with ruby <filename>.rb (first making sure I was in the correct directory) | ||
|
||
3. What character is used to indicate comments in a ruby file? | ||
octothorpe # | ||
|
||
4. Explain the difference between an integer and a float? | ||
integers are whole numbers and floats carry out past the decimal (3 - integer vs. 3.14159 - float) | ||
|
||
5. In the space below, create a variable `animal` that holds the string `"zebra"` | ||
animal = "zebra" | ||
|
||
6. How would you print the string `"zebra"` using the variable that you created above? | ||
puts animal | ||
|
||
7. What is interpolation? Use interpolation to print a sentence using the variable `animal`. | ||
interpolation inserts variables into strings, other variables, etc. | ||
puts "#{animal}s have stripes" | ||
|
||
8. What method is used to get input from a user? | ||
gets (gets.chomp removes the /n) | ||
|
||
9. Name and describe two common string methods: | ||
lower() will convert to lower case; capitalize() will capitalize the first latter |
This file contains 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,6 @@ | ||
#this is what i owe for rent | ||
puts "Rent total percentage and each owed DJ and TO #{1299 * 0.60 / 2}" | ||
puts "Rent total percentage MW #{1299 * 0.40}" | ||
|
||
puts "Amount MW is owed from TO #{1299 / 2 - 1299 * 0.40}" | ||
puts "Amount DJ is owed from TO #{1299 / 2 - 1299 * 0.60 / 2}" |
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.
Have you tried running this line (either by executing the file or in irb?) This is not the correct Ruby way to say '3 does not equal 4'