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
module FileHandler | |
def self.load_from_file(filename) | |
File.open(filename, "r") | |
end | |
end | |
class Card | |
attr_reader :keyword, :definition | |
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
class BankAccount | |
def initialize(customer_name, type, acct_number) | |
@customer_name = customer_name | |
@type = type | |
@acct_number = acct_number | |
end | |
def customer_name=(customer_name) | |
@customer_name = customer_name | |
end |
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
# Put your answers here! |
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
Script: CONVERT EVERY OTHER LETTER OF A SENTENCE TO CAPITAL LETTERS | |
GET a sentence from user input | |
IF the word starts with a capital letter, don't change it | |
ELSE convert every other letter to capital letters | |
ENDIF | |
PRINT the formatted sentence | |
def new_pseudo | |
sentence = gets.chomp |