-
Notifications
You must be signed in to change notification settings - Fork 66
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
Aleisha Mork #71
Open
aleish-m
wants to merge
9
commits into
turingschool:main
Choose a base branch
from
aleish-m: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
Aleisha Mork #71
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
2c70481
Add Section1
aleish-m 25d8000
Correction to refllection.md
aleish-m f80c961
Add Section 2 work
aleish-m 3f0d435
Add section 3 work
aleish-m 2b0f803
Refractor of section 1
aleish-m 376f3e8
Refractor of section 2
aleish-m 17a1ac9
Refractor section 3
aleish-m 4063cb2
Correct formating for section 3 reflection
aleish-m eaa3152
Add section 4 work
aleish-m 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
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,13 @@ | ||
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.' | ||
|
||
# Study Drills: | ||
# 1#: | ||
puts "Welcome to Section 1." | ||
|
||
# 3: It makes the text greyed out, and it does not print in the terminal. |
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,29 @@ | ||
print "What is your name? " | ||
name = gets.chomp | ||
print "How old are you? " | ||
age = gets.chomp.to_i | ||
print "What month is your birthday? " | ||
month = gets.chomp | ||
print "How tall are you? " | ||
height = gets.chomp | ||
print "How much do you weigh? " | ||
weight = gets.chomp | ||
|
||
puts "So #{name} you're #{age} old, #{height} tall and #{weight} heavy." | ||
|
||
puts "And in #{month} #{name} will be #{age +1}!" | ||
|
||
|
||
# Study Drills: | ||
|
||
# 1: gets.chomp - | ||
# gets - Pauses the program to get input from the user | ||
#. chomp - removes the 'enter' (aka new line) character that was entered | ||
# due to the enter/return key being hit to continue the program so that the | ||
# 'new line' character is not stored as part of the input value | ||
|
||
# 2: | ||
# I found gets.chop which removes whatever the last character entered and teh 'new line' character | ||
# I found gets.strip which removes excess space characters before or after what is entered | ||
|
||
# 3: See line 1, 2, 5, 6, 12, and 14 |
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 @@ | ||
# 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 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,42 @@ | ||
# prints a text string | ||
puts "I will now count my chickens:" | ||
|
||
# prints the string Hens and prints the calculation of the following math problem | ||
puts "Hens #{25.0 + 30.0 / 6.0}" | ||
# prints the string Roosters and prints the calculation of the following math problem | ||
puts "Roosters #{100.0 - 25.0 * 3.0 % 4.0}" | ||
|
||
# prints the following text string | ||
puts "Now I will count the eggs:" | ||
|
||
# prints the calculation of the following math problem | ||
puts 3.0 + 2.0 + 1.0 - 5.0 + 4.0 % 2.0 - 1.0 / 4.0 + 6.0 | ||
|
||
# prints the following string of text | ||
puts "Is it true that 3 + 2 < 5 - 7?" | ||
|
||
# prints if the following math statment is true or false | ||
puts 3.0 + 2.0 < 5.0 - 7.0 | ||
|
||
# prints the text string and solves the math calculation provided between the brackets | ||
puts "What is 3 + 2? #{3.0 + 2.0}" | ||
puts "What is 5 - 7? #{5.0 - 7.0}" | ||
|
||
# prints the following string of text | ||
puts "Oh, thats why its's false." | ||
|
||
puts "How about some more." | ||
|
||
# prints the following string and if the equation in the brackets is true or false | ||
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}" | ||
|
||
|
||
#Study Drills: | ||
# 1: See above. | ||
|
||
# 2: Done in 'irb' nothing to show here. | ||
# 3: I dont want to create an additional file... can I just do it here? | ||
puts (8 + (8.75 - 1.75) + 8.75 + 5.5) - 40 | ||
# 4: See above. |
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,42 @@ | ||
# This assigns the variable name car to the value 100 | ||
cars = 100 | ||
# This assigns the variable name space_in_a_car to the value 4.0 | ||
space_in_a_car = 4 | ||
# This assigns the variable name drivers to the value 30 | ||
drivers = 30 | ||
# This assigns the variable name passengers to the value 90 | ||
passengers = 90 | ||
# This assigns the variable name cars_not_driven to the value of the variable 'car' less the value of the variable 'drivers' | ||
cars_not_driven = cars - drivers | ||
# This assigns the variable name cars_driven to the value of the variable 'drivers' | ||
cars_driven = drivers | ||
# This assigns the variable name carpool_capacity to the value of the variable cars_driven multiplied by the value of the variable space_in_a_car | ||
carpool_capacity = cars_driven * space_in_a_car | ||
# This assigns the variable name average_passengers_per_car to the value of teh variable passengers divided by the value of the variable cars_driven | ||
average_passengers_per_car = passengers / cars_driven | ||
|
||
|
||
# The following uses the variables assigned above within a string, the value assigned will print rather than the variable name. | ||
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." | ||
|
||
|
||
# Study Drills: | ||
|
||
# Error received in Study Drill: It appears this error would be | ||
# due to carpool_capacity not being listed in the opening with | ||
# what it equals. Because this name was not given a value it is | ||
# an unknown variable. | ||
|
||
#1 & 2: | ||
# Making is 4 vs 4.0 does not change any of the calculated | ||
# values however it does remove the float, so could create | ||
# different values depending on the other numbers used. In | ||
# in this situation since you can not have part of a person | ||
# or seat removing the float is probably best. | ||
|
||
# 3: See above. |
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 @@ | ||
name = 'Zed A. Shaw' | ||
age = 35 | ||
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." | ||
|
||
puts "If I add #{age}, #{height}, and #{weight} I get #{age + height + weight}." | ||
|
||
|
||
# Study Drills: | ||
|
||
# 1: See above - removed the 'my_' | ||
# 2: | ||
puts "#{74 * 2.54} - Is Zed's height in centimeters." | ||
puts "#{180 / 2.205} - Is Zed's weight in kilograms." |
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,46 @@ | ||
# Assigning a variable | ||
types_of_people = 10 | ||
# Assigns a variable that has a string containing another variable as the value | ||
x = "There are #{types_of_people} types of people." | ||
# Assigns a string variable | ||
binary = "binary" | ||
do_not = "don't" | ||
# Assigns a variable with a string value that contains/referances other variables that are strings | ||
y = "Those who know #{binary} and those who #{do_not}." | ||
|
||
# Prints the assigned variables | ||
puts x | ||
puts y | ||
|
||
# Prints the assigned string variables within another string | ||
puts "I said: #{x}." | ||
puts "I also said: '#{y}'." | ||
|
||
# Assigning new variables | ||
hilarious = false | ||
joke_evaluation = "Isn't that joke so funny?! #{hilarious}" | ||
|
||
# Prints the assigned string variable | ||
puts joke_evaluation | ||
|
||
# Assigns new variables with string values | ||
w = "This is the left side of..." | ||
e = "a string with a right side." | ||
|
||
# Prints the assigned string values for each variable. Combining them to make 1 printed string | ||
puts w + e | ||
|
||
|
||
# Study Drills: | ||
|
||
# 1 & 2: - See Above | ||
|
||
# 3: | ||
# This works because you are adding the values of the variables | ||
# assigned to 'w' & 'e' so it's kinda working like | ||
# "put this and also put this" | ||
|
||
# 4: | ||
# Some still work. But the ones that don't I think its because | ||
# the computer does not know how to tell when its the end of | ||
# a string vs an apostrophe or quotes within a statement. |
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
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.
👏