Python iPod challenge

Tim Chase python.list at tim.thechases.com
Thu Nov 8 09:11:27 EST 2007


>>    if you are interested please be so kind to visit:
>>
>>              http://test-iq.web.cern.ch/test-iq/step1.php?lang=en
> 
> Well, just out of curosity, i started the test, however, it seems a
> little bugy. My answer to the first question one was:
[snipped]
> getting the following error:
> 
> SYNTAX ERROR Check line 3 text = 'In principio creavit Deus caelum et
> terram. Terra autem erat' ^
> 
> Im not sure but i think you are looking for only one method of getting
> the answer, however, there are several ways to achieve it, so, im
> done..lol, no offense, but if im going to fail the test, i want to
> fail because i  did it wrong and not because i did it different..

I had similar problems.  Additionally, that's pretty unpythonic 
code, as the "correct" answer would be something like

  print text.count("a")

which obviates the whole looping/testing/counting aspect, letting 
Python just do its thing instead.

The whole thing also seemed to fail if JavaScript/Cookies were 
turned off (I don't know which was the culprit...two strikes was 
enough to ).

-tkc






More information about the Python-list mailing list