473,287 Members | 1,581 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,287 software developers and data experts.

Python iPod challenge

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

Nov 8 '07 #1
4 1058
On Nov 8, 2:21 am, joseto...@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..


Nov 8 '07 #2
> 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

Nov 8 '07 #3
En Sun, 11 Nov 2007 13:33:09 -0300, <jo*******@gmail.comescribi�:
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.

--
Gabriel Genellina

Nov 12 '07 #4
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.

On Nov 12, 10:35 am, "Gabriel Genellina" <gagsl-...@yahoo.com.ar>
wrote:
En Sun, 11 Nov 2007 13:33:09 -0300, <joseto...@gmail.comescribi?:
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.

--
Gabriel Genellina

Nov 12 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: David Mertz, Ph.D. | last post by:
I decided to write a pure Python hashcash implementation. I have seen David McNab's Python implementation. Unfortunately, as near as I can tell (which is supported on the hashcash mailing list...
34
by: Blake T. Garretson | last post by:
I want to save some sensitive data (passwords, PIN numbers, etc.) to disk in a secure manner in one of my programs. What is the easiest/best way to accomplish strong file encryption in Python? ...
0
by: Greg Sandell | last post by:
Can anyone point me to some techniques on manipulating the XML file that iPod uses to manage its contents? Basically I want to (1) export the XML file off the iPod, (2) change things in the XML,...
0
by: jack | last post by:
Hi, Since May 2005 there is a port of python (v2.4.1) for Apple iPod. Porting was an 'easy' job, the only consideration was how you can write with a iPod, ipodlinux people did an interface...
0
by: Magnus Lycka | last post by:
QOTW: "Excessive cleverness can lead to unmaintainable code. So can excessive stupidity." -- Alan Morgan "Also Python code is pretty bare-metal, so that file.write or socket.write go to the...
0
by: richard | last post by:
The date for the second PyWeek challenge has been set: Sunday 26th March to Sunday 2nd April (00:00UTC to 00:00UTC). The PyWeek challenge invites entrants to write a game in one week from...
0
by: dominiquevalentine | last post by:
anyone have any advice as to where to start if i say..wanted to program the ipods UI? I have one python project under my belt so far, and i'm going for my second. I want to try to mimic the ipod...
0
by: dvd | last post by:
Hi i have a python script that uses urllib2 to download one file, it runs ok in any pc but when urlopen is called in the ipod it show the following error: <urlopen error (4, 'Non-recoverable...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.