Skip to content
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

Joe Mecha #427

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Open

Joe Mecha #427

wants to merge 13 commits into from

Conversation

joemecha
Copy link

Mod 1 prework completed!

Copy link
Contributor

@francepack francepack left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, strong work and effort! Very nice job working on the challenges at the end- all the effort there will pay off at Turing, being familiar with code challenges, breaking those problems apart, and digging in to research. Keep up the practice and experimentation!

def add_topping(topping)
@toppings << topping
end

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice attribute/method interactions here!

end
end

ten_speckled_frogs(10)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice job seeing all the conditions to hit here. A next step could be to model this like a little ruby program, gathering some user input to run in your function.

print "Please enter the word(s) you want to encode: "
string = gets.chomp
print "Enter the number of characters to shift by (ex. 3 shifts A to D; -3 shifts A to X): "
shift_value = gets.chomp.to_i
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice job leveraging user input here! Also, way to stick with this challenge and push through! Seeing loots of good progress across the different cipher files. Some of this stuff- you can just find the answers out there, but grappling with it, breaking code, and experimentation are the best ways to learn the ins and outs- very well done here.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mason -- thanks for the encouragement here, and for reviewing my all of my work -- cheers!


def encode
cipher_hash = {"A" => 0, "B" => 1, "C" => 2, "D" => 3, "E" => 4, "F" => 5 "G" => 6, "H" => 7, "I" => 8, "J" => 9, "K" => 10, "L" => 11, "M" => 12, "N" => 13, "O" => 14, "P" => 15, "Q" => 16, "R" => 17, "S" => 18, "T" => 19, "U" => 20, "V" => 21, "W" => 22, "X" => 23, "Y" => 24, "Z" => 25}
cipher_array = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

arrays are just hashes where the 'key' is the index number, and the element is the value. If that doesn't make sense right way, just something to stew on.

row_counter -= 1
end
end

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Way to stay organized! Loops within loops can get hairy.

print "FizzBuzz, "
# For any number that is a multiple of 3, print 'Fizz'
elsif (a % 3) == 0 && (a % 5) != 0
print "Fizz, "
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't need the second part of the conditionals here- if both applied, it'd be swooped up by your first condition! You can just run the second 2 conditions checking for the 0 value of a modulo, rather than needing to see if it != 0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants