-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDeafGrandma.rb
More file actions
33 lines (33 loc) · 763 Bytes
/
DeafGrandma.rb
File metadata and controls
33 lines (33 loc) · 763 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
me = gets.chomp
bool = true
counter = 0
finish = "bye"
finish.upcase
if (me != finish || finish.upcase)
while (bool)
if /[[:lower:]]/.match(me)
grandma = "HUH?! SPEAK UP, JOSHY!"
puts grandma
me = gets.chomp
if (me == finish || me = finish.upcase)
counter += 1
if (counter == 3)
bool = false
end
end
else
while (/[[:upper:]]/== me || bool == true)
year = rand (1935..1989)
grandma = "Not since #{year}, you know I hate those commies Egbert"
puts grandma.upcase
me = gets.chomp
if (me == finish || finish.upcase)
counter += 1
if (counter == 3)
bool = false
end
end
end
end
end
end