472,973 Members | 1,929 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,973 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 1054
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...
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
4
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

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.