AUGH! Bretheren! You've got to help me! I started taking the midterm in my Perl class, and the questions seemed to be written in MISHMASH
I snuck out the back door and pretended like I was going to the loo, but I've come here instead! Please answer all of the following questions for me... Uhh and from the 15 minutes I took looking at the test and panicking, I kinda need these in the next 35 minutes.
Oh no, they've started searching the stalls. They'll soon find me, and I doubt they'll give me extra credit for being able to connect to the site through my Palm pilot rigged to a cell phone. I'm going to go back to the room and spend the next 30 minutes trying to think of excuses, and then I'll projectile vomit towards the front and run out screaming. I'll re-establish the connection, copy the answers, and then turn my paper in in the hubbub and confusion. Since I've never been to the professor's office hours or discussion section, I don't think he knows my name, and thus won't be able to find my test amid the swarms of others. Okay.. .hurry now!
- 1: Write a subroutine that simulates all of the logical boolean operators up to 10 variables, (eg: abc'defg'h'ij, abc'defg'h'ij'...) The subroutine should take 11 arguments, (opcode and 10 variable inputs) But the inputs must rotate depending on the truth of the first input. eg (if a=0 then opcode,a,b,c,d,e,f,g,h,i,j) (if a=1 then opcode,j,i,h,g,f,e,d,c,b,a) 2 points will be taken off for every line over 10. (And you must format correctly, bonus points for clear,unobfuscated code.)
- 2: Write an automatic perl prose translator. Given a work of Shakespeare, what program would output a suitible Perl translation? Test your program on "Abraham: Do you bite your thumb sir? Sampson: I do bite my thumb, sir. Abraham: Do you bite your thumb at _US_ sir?"
- 3: If the Byzantine Empire had been given the opportunity to use Perl to manage its affairs, would it still have fallen at the hands of the invading Mongol hordes? Assume the Ottoman Empire was running BeOS.
- 4: Use PERL to solve the TOE (Theory of Everything) or the GUT (Grand Unification Theory)
- Extra credit: What was the summer job Larry Wall held between his 9th and 10th grade years in high-school?
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||