Python iPod challenge

J

josetokyo

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
 
S

scripteaze

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

Tim Chase

if you are interested please be so kind to visit:

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
 
A

Alan Franzoni

Il Thu, 08 Nov 2007 08:11:27 -0600, Tim Chase ha scritto:

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

That's true, but you should remember it's a linguistic experiment, not a
Python programming contest. The task is not to "do that thing in the best
possible way", but to "fill in the gaps". You should just try to understand
what the "original programmer" did and to complete the program in such way.

Real problems here lie in the webapp implementation: it should check for
javascript *before* beginning the test (I have noscript enabled, and had to
give permission to the site, hence it took me far more time to complete the
test since I was just clicking but obtaining nothing) and should state more
clearly that it just needs the number of letters as the output (this should
be related to scripteaze problem) without any other character. Error
messages are pretty counter-intuitive.

--
Alan Franzoni <[email protected]>
-
Togli .xyz dalla mia email per contattarmi.
Remove .xyz from my address in order to contact me.
-
GPG Key Fingerprint (Key ID = FE068F3E):
5C77 9DC3 BD5B 3A28 E7BC 921A 0255 42AA FE06 8F3E
 
J

josetokyo

Hi guys,..

thanks for your thoughtful comments...
as Alan says, its just a linguistic experiment...
it seems the problem you guys found appears...
when combining Windows OS and MSIE...
(apologies... m_._m )

Dont know how to fix it .(I am a begginer...)
if some soul wanna help out... the code is here...
http://test-iq.web.cern.ch/test-iq/piton_is_easy.tar

Anyway it works fine with firefox :)

Thanks!
 
G

Gabriel Genellina

it seems the problem you guys found appears...
when combining Windows OS and MSIE...
(apologies... m_._m )

Or any other OS+browser with javascript disabled.
BTW, why do you require JS? Looks like it should be possible to do it with
just HTTP POST and plain old forms...
Dont know how to fix it .(I am a begginer...)
if some soul wanna help out... the code is here...
http://test-iq.web.cern.ch/test-iq/piton_is_easy.tar

Anyway it works fine with firefox :)

The HTML code is invalid, so it works "fine" just by accident.
 
J

jose Barcelona

Gabriel,

Now it works fine with FIREFOX , SAFARI and MSIE.
(MSIE didnt like the the way prototype.js deals with CR LF)
BTW, why do you require JS?
The python interpreter comunicates back and forth via a widget
just like gmail XD. Sorry for that.

Anyway we stil need volunteers...
http://cern.ch/test-iq
Thanks!
J.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,905
Latest member
Kristy_Poole

Latest Threads

Top