Refactor
:my
=>
'code'
Codes
Refactorings
Popular
Best
Submit
Spam
Account
Logout
Login
JavaScript doesn't seem to be activated, expect things to be ugly and sloppy!
Learn How to Create Your Own Programming Language
createyourproglang.com
Recent
FILE HOSTS PREMIUM ACCOUNT
ALL FILE HOST PREMIUM ACCOUNTS
Zynga Slingo Trainer v5.12
iTunes Gift Card Generator V3.1 2012
Diablo 3 GOLD Coins FREE
Working PS3 Jailbreak 3.65 And 3.66
ExtaBit Premium Accounts and Cookies
Steam Wallet Hack - Money Adder & Hack v3
Empires & Allies Hack Cheat Trainer v5.4.1
Eve Onnline 60 Days Time Card Generator v2
Popular
XBOX POINTS GENERATOR - MICROSOFT POINTS GENERATOR v1.2012
11 may 2012 premium uploading accounts 100% working
Free Microsoft Points
Free Microsoft Points - Microsoft Points Generator - Xbox Live Codes 2012
Car Town Free Blue Points Hack
Free CarTown Blue Points Generator and CarTown Templates
Better way to get content via jQuery $.get()
Free Microsoft Points
Simple Days Purger
Sharecash Downloader Bypass Surveys New 05/2012
Pastable version of
Exercise: Deaf Grandma
<pre class='prettyprint' language='ruby'>def granny_says(str) str.each_byte do |byte| print byte.chr sleep 0.01 STDOUT.flush end puts STDOUT.flush end loop do granny_says("<Intermediary> Got a question for Granny? Make sure to" ) granny_says(" input yo' question in all caps, or else" ) granny_says(" granny can't hear ya'!\n" ) reply = gets.chomp if (reply == reply.upcase) random = rand(21) + 1930 granny_says("\n<Granny> No, not since #{random}! ... that's all the time" ) granny_says(" I've got, child! Hasta la-bye-bye, baby!\n\n" ) granny_says("<Intermediary> Granny's a bit hard of hearing today. I" ) granny_says(" apologize. Ya' may have to say \"bye\" a" ) granny_says(" few times for her to understand y'are" ) granny_says(" leaving, since it's rude to leave with-" ) granny_says(" out biddin' yo' adieus. 3 times just" ) granny_says(" might do it! In a row, even!\n\n" ) goodbyes = 0 while goodbyes != 3 you_say = gets.chomp if (you_say == "BYE") then goodbyes = goodbyes + 1 else goodbyes = 0 end if (goodbyes == 1) granny_says("\n<Intermediary> That's once!\n\n" ) elsif (goodbyes == 2) granny_says("\n<Intermediary> That's twice!\n\n" ) elsif (goodbyes == 3) granny_says("\n<Intermediary> That's thrice! That should do it!\n") else granny_says("\n<Intermediary> That's either not in caps, not an adieu") granny_says(" or neither. How 'bout 'ya try that again?\n") end end granny_says("\n<Granny> I'm not dense, youngin'! I heard you the" ) granny_says(" first time! I... CAN... HEAR... JUST..." ) granny_says(" FINE. The nerve of you, child! I oughta" ) granny_says(" bust your little ass!\n\n" ) granny_says("<Intermediary> Ya' sure did do a fine job of pissin'" ) granny_says(" off yo' granny, didn't 'ya? If 'ya" ) granny_says(" wanna talk with her again, schedule" ) granny_says(" an appointment with me later on in" ) granny_says(" in the week. Give her some time to" ) granny_says(" cool off. Talk to 'ya then!" ) break else granny_says("\n<Intermediary> Granny can't hear 'ya! Wanna know why?" ) granny_says(" 'Cause that wasn't in all caps, yo'!" ) granny_says(" So, I'll repeat what I said before ...\n\n" ) end end</pre> <a href="http://www.refactormycode.com/codes/404-exercise-deaf-grandma" style="color:#fff" title="As seen on RefactorMyCode.com"><img alt="Small_logo" src="http://www.refactormycode.com/images/small_logo.gif" style="border:0" /></a>