The 2008 Winter Scripting Games

Sudden Death Challenge Event 6: If at First You Don’t Succeed …

Important: The deadline for this event has passed. You can find the solution here.

In If at First You Don’t Succeed … competitors must write a script that can correct a string rife with letter case problems and incorrect numbers.

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 6 of the Sudden Death Challenge, well, keep reading.

*
On This Page
About This Sudden Death Challenge EventAbout This Sudden Death Challenge Event
Sudden Death Challenge Event ScenarioSudden Death Challenge Event Scenario
How to Enter This Sudden Death Challenge EventHow to Enter This Sudden Death Challenge Event

About This Sudden Death Challenge Event

Deadline

Tuesday, February 26, 2008 3:00 PM PST

Points Awarded

1 point in the Sudden Death Challenge

Top of pageTop of page

Sudden Death Challenge Event Scenario

Remember back in Event 2 of the Sudden Death Challenge, when we tried to type the phrase The 2008 Winter Scripting Games! only to end up typing this instead:

T Sg
hWc 
eirG
 nia
2tpm
0ete
0ris
8 n!

Well, today we tried typing The 2008 Winter Scripting Games! again. And, well, once again we did it all wrong:

tHE 3119 wINTER sCRIPTING gAMES!

As you can see, we made several mistakes here:

Any time we needed an uppercase letter we inadvertently typed a lowercase letter instead. Thus the T in The ended up as a t.

Any time we needed a lowercase letter we inadvertently typed an uppercase letter instead. Thus the letters he in The ended up as HE.

Any time we needed a number we typed a value one number too high. Thus the 2 in 2008 ended up as a 3.

Other than that, though, everything seemed to go just fine.

So what do you need to do to successfully complete Event 6 in the Sudden Death Challenge? You got it; you need to write a script (using VBScript, Windows PowerShell, or Perl) that can turn this string value:

tHE 3119 wINTER sCRIPTING gAMES!

Into this string value:

The 2008 Winter Scripting Games!

If you can do that for us, we’ll never try typing The 2008 Winter Scripting Games! ever again.

Promise.

If you want to, you can try to copy and paste our mistyped text directly off this Web page. However, we don’t recommend that; we can’t guarantee that the spacing and formatting will come out correctly. Instead, we recommend you read the data in from the file Lettercase.txt, which is included in the Competitor’s Pack. Just make sure you place this file in the folder C:\Scripts. If you don’t, your script is unlikely to work when we test it.

Top of pageTop of page

How to Enter This Sudden Death Challenge Event

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 (in English, if possible) with the subject line Sudden Death Challenge: Event 6.

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

Top of pageTop of page