Created
March 2, 2020 02:29
-
-
Save harrisonmalone/76044cf1b236ab7c5e779adc4c52c0f8 to your computer and use it in GitHub Desktop.
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
# # a. Winner Predictor | |
# # Time to predict the winner! | |
# # Define a method called method_one. | |
# # It takes a string (as an argument), and then returns the string + " will be". | |
# # Define a method called method_two. | |
# # It takes a string, and returns the string + " the ultimate". | |
# # Define a method called method_three. | |
# # It takes a string and returns the string + " winner.". | |
# # Define a method called winner_predictor. | |
# # It takes a string, and calls the previous methods to complete the string "Sabrina will be the ultimate winner.". | |
# # Call winner_predictor("Sabrina") to start the process. | |
# def method_one(string_1) | |
# return string_1 + " will be" | |
# end | |
# def method_two(string_2) | |
# return string_2 + " the ultimate" | |
# end | |
# def method_three(string_3) | |
# return string_3 + " winner." | |
# end | |
# def winner_predictor(string_4) | |
# part_1 = method_one(string_4) # "Sabrina will be" | |
# part_2 = method_two(part_1) | |
# part_3 = method_three(part_2) | |
# return part_3 | |
# end | |
# p winner_predictor("Sabrina") | |
# What is the value of hp? | |
# magic = true | |
# hp = magic ? "Wizard" : "Faker" | |
# p hp | |
# def random_method | |
# return "hi" | |
# end | |
# random_method() | |
# def puts(string) | |
# return "sup" | |
# end | |
# puts("hello") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment