Question: require './input_functions' # write code that reads in a user's name from the terminal. If the name matches # your name or your tutor's name,

require './input_functions'
# write code that reads in a user's name from the terminal. If the name matches
# your name or your tutor's name, then print out "
# Otherwise call a function called print_silly_name(name) - to match the expected output.
#def print_silly_name(name)
#
#end
def main
name = read_string("What is your name?")
if name == "Ted" or name == "Fred"
puts name + " is an awesome name!"
else
puts(name + " is a silly name")
end
end
main
Implement a main procedure with the following logic: - It reads a name from the user, and displays back a message. - Check if the name entered is your name or your tutor's name. - If the name is your name or your tutor's name output the message: '\#\{name\} is an awesome name!' - Otherwise output the silly name message: '\#\{name\} is a silly name
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
