Important: The deadline for this event has passed. You can find the solution here. |
In What’s in a Name? competitors are asked to report back statistics based on the names of US Presidents.
Note. The Sudden Death Challenge is a separate competition from the main Scripting Games and Scripting Games events; although anyone can enter the Sudden Death Challenge, it’s primarily designed for those people who manage to breeze through the main Scripting Games events in a day or two. To enter the main Scripting Games, click here. To enter Event 3 of the Sudden Death Challenge, well, keep reading.
| About This Sudden Death Challenge Event | |
| Sudden Death Challenge Event Scenario | |
| How to Enter This Sudden Death Challenge Event |
Deadline | Tuesday, February 21, 2008 3:00 PM PST |
Points Awarded | 1 point in the Sudden Death Challenge |
When most people think about US Presidents they think about things like this:
| • | Who was the best US President? |
| • | Who was the worst US President? |
| • | Who will be the next US President? |
When the Scripting Guys think about US Presidents, they tend to think about things like this:
| • | Which US President has the longest first name? |
| • | Which letters (if any) do not appear in the initials (first and last names) of the US Presidents? |
| • | How many vowels (the letters a, e, i, o and u) are used in the first and last names of all the US Presidents? |
Now, try to guess which set of questions you need to answer to successfully complete Event 3 in the Sudden Death Challenge.
Ah, good guess. To help you answer these questions, we’ve included a file (Presidents.txt) in the Scripting Games Competitors Pack. (Note: Make sure you put this file in the folder C:\Scripts.) This file lists the names of all the US Presidents, using the format lastname, firstname. In other words:
Washington, George Adams, John Jefferson, Thomas Madison, James Monroe, James
Your script needs to read in this list of names, and then answer the following questions:
Which US President has the longest first name (that is, which first name has the most characters in it)? Suppose you think that the President with the longest first name in John Adams. (Note: It’s not.) In that case, you script needs to echo back the President’s name, this time using the format firstname lastname. In other words
Longest first name: John Adams
Which letters (if any) are not used as initials in the first and last names of the US Presidents? What does that mean? Well, for the purposes of this event, we’re considering an initial to be any uppercase letter. Thus the first President in our list – Washington, George – has two initials: W and G. Based on that, it’s safe to say the letters W and G are used as initials in our collection of Presidential names. But what about the letter B? Do any US Presidents have the letter B as one of their initials? What about the letter R? Well, that’s what your script needs to determine. Figure out which letters, if any, are not used as Presidential initials, and then report back that information:
A B E W
Note. No, that sample output is not the correct answer. Even the Scripting Guys are smart enough not to show you the actual answer in their sample output! |
How many vowels (the letters a, e, i, o, and u) are used in the Presidential names? Let’s take our first President, Washington, George. As you can see, George Washington includes 6 vowels:
| • | a |
| • | i |
| • | o |
| • | e |
| • | o |
| • | e |
Now all you have to do is add the number of vowels used in all the other Presidential names and you’re done. When you are done, just echo back the total number of vowels used:
Total vowels used: 6
That’s all you have to do.
Note. So who was the worst US President of all time? Well, we can’t tell you that; after all, that might be an event in next year’s Scripting Games! |
After completing the script, click here to submit your entry. If the link doesn’t automatically open a pre-addressed message, send email to scripter@microsoft.com with the subject line Sudden Death Challenge: Event 3.
All you have to do is paste your solution into the body of the message and then send the mail. You may also include the following:
| • | A name or nickname we can use to identify you when posting Sudden Death Challenge points leaders. |
| • | The name of the country you would like to represent. This might be your country of birth or the country you currently live in, but it doesn’t have to be; you can represent any country you wish. |
Note that Sudden Death points/participation will not be included in either the User Group or International Challenges.
You can simply type these items in at the top of the email. In that case, your email might look something like this:
Ken Myer
USA
For i = 1 to 100
Wscript.Echo i
Next