FAQ  •  Login

Level 10

Moderators: UncleTimmy, mjpieters

Enjoying the challenge? Need a hint?
Make a donation and help keep the site running! -thesamet
<<

tzot

Posts: 27

Joined: Wed May 04, 2005 4:26 am

Location: Hellas

Post Wed May 04, 2005 4:30 am

Level 10

Hint 1: Morris
Hint 2: hettingertools
<<

manuelg

Posts: 5

Joined: Tue May 03, 2005 5:48 pm

Post Wed May 04, 2005 9:41 am

whoops

technically, should be TypeError, or else change a to:

[[1], [1, 1], [2, 1], [1, 2, 1, 1], [1, 1, 1, 2, 2, 1]
<<

tzot

Posts: 27

Joined: Wed May 04, 2005 4:26 am

Location: Hellas

Post Wed May 04, 2005 9:47 am

strings are sequences too ;)
<<

manuelg

Posts: 5

Joined: Tue May 03, 2005 5:48 pm

Post Wed May 04, 2005 9:59 am

>>> a = [1, 11, 21, 1211, 111221]
>>> len(a[4])
Traceback (most recent call last):
File "<interactive input>", line 1, in ?
TypeError: len() of unsized object
<<

rspyc

Posts: 80

Joined: Sat Apr 30, 2005 8:15 am

Location: Flanders, Belgium

Post Wed May 04, 2005 12:22 pm

manuelg wrote:>>> a = [1, 11, 21, 1211, 111221]

You could use

>>> a = ['1', '11', '21', '1211', '111221']

instead.
<<

birkenfeld

Posts: 31

Joined: Tue May 03, 2005 1:11 am

Post Wed May 04, 2005 12:57 pm

I don't think that you need to use anything like that. A plain '1' is enough to start the algorithm.
<<

cmiller0

Posts: 2

Joined: Wed May 04, 2005 6:39 pm

Post Wed May 04, 2005 6:46 pm

Algorithm, huh?

I don't understand the sequence.

Presumably, given a[n] through a[n+4], you should be able to find a[n+5]. I don't see a pattern though. It's no "triangle" that I know of.
<<

Dan

Posts: 63

Joined: Sun May 01, 2005 3:09 pm

Post Wed May 04, 2005 8:49 pm

birkenfeld wrote:I don't think that you need to use anything like that. A plain '1' is enough to start the algorithm.


Well, it might be enough once you know the algorithm, but it would be very hard to figure out the pattern just from that one '1'. After all, there are an infinite number of sequences that start with 1, including {1, 2, 3, ...} and {1, 2, 4, ...} and {1, -1, 1, ...} and even {1, 1, 1, ...}. And course, the actual solution, which is completely unrelated to any of those.
<<

jpfarias

Posts: 18

Joined: Tue May 03, 2005 2:11 pm

Post Thu May 05, 2005 4:48 am

I need a tip for this one....

--
JP
<<

tzot

Posts: 27

Joined: Wed May 04, 2005 4:26 am

Location: Hellas

Post Thu May 05, 2005 4:54 am

tip: check the very first post from me. google for the first hint along with some of the numbers.
<<

Dan

Posts: 63

Joined: Sun May 01, 2005 3:09 pm

Post Thu May 05, 2005 5:01 am

Hint: You'd get a different sequence if we didn't use base-10 counting.
<<

mjpieters

Site Admin

Posts: 172

Joined: Wed May 04, 2005 8:56 am

Location: Norway

Post Thu May 05, 2005 5:13 am

Google is your friend

Try googling for more hints.
<<

jpfarias

Posts: 18

Joined: Tue May 03, 2005 2:11 pm

Post Thu May 05, 2005 5:14 am

thanks, got it!

--
JP
<<

DJohn

Posts: 8

Joined: Thu May 12, 2005 6:33 am

Post Thu May 12, 2005 6:36 am

I must be doing something wrong. I found the sequence, found item 30 of it, and counted the length. Then I tried http://www.pythonchallenge.com/pc/return/<length>.html
but got nowhere. Is my error in the length or the url?
<<

thesamet

Python Challenge Leader

Posts: 69

Joined: Thu Apr 28, 2005 11:02 pm

Post Thu May 12, 2005 6:42 am

Probably wrong length. note that this is a pythonic list.

DJohn wrote:I must be doing something wrong. I found the sequence, found item 30 of it, and counted the length. Then I tried http://www.pythonchallenge.com/pc/return/<length>.html
but got nowhere. Is my error in the length or the url?
Last edited by thesamet on Thu May 12, 2005 9:11 am, edited 1 time in total.
Next

Return to Python Challenge Hints

Who is online

Users browsing this forum: Google [Bot] and 5 guests

cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.