Python iPod challenge

scripteaze scripteaze at gmail.com
Thu Nov 8 08:53:26 EST 2007


On Nov 8, 2:21 am, joseto... at gmail.com wrote:
> Hi!
>    a friend and me are investigating how mother-tongue influences
> programming productivity.
>    We need volunteers to take on  a 3 minutes python language
> programming test.
>    if you are interested please be so kind to visit:
>
>              http://test-iq.web.cern.ch/test-iq/step1.php?lang=en
>
>    if your native language is Spanish please do it in Spanish
> language. Beginners particularly welcome
>
> Thanks!
>
> jose berengueres

Well, just out of curosity, i started the test, however, it seems a
little bugy. My answer to the first question one was:


text = 'In principio creavit Deus caelum et terram. Terra autem erat'
count = 0
for char in text:
      if char == 'a':
            count = count + 1
print 'the letter a appears',count ,'times.'


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..







More information about the Python-list mailing list