Learning Python: need projects for beginners
1
Name:
Anonymous
2008-05-07 12:52
Hello EXPERT PROGRAMMERS
I am re-learning python/reinforcing what I know and I have written some simple apps, one is a cgi youtube downloader. I am going to write some stuff for del.icio.us and other API's.
Please post some ideas for some projects that would help me become more comfortable with python. Bonus points for web related/irc related.
Please keep the ideas at the beginner level as I am not an
EXPERT PROGRAMMER
2
Name:
Anonymous
2008-05-07 12:55
Write a function substring that checks whether str1 is a substring of str2.
3
Name:
Anonymous
2008-05-07 13:07
import re
def substr(arg1, arg2):
if re.search(arg1, arg2) == None:
print 'No match found'
else:
print "found match at " + repr(re.search(arg1, arg2).span())
>>> substr("jarrod", "asldkjfhsalkdfjhasdkfljhasdfkjarrodshdfdafasdf")
found match at (29, 35)
>>> substr("jarrod", "asldkjfhsalkdfjhasdkfljhasdfkjarodshdfdafasdf")
No match found
Next test please. I will be back later. I want to build something cool. Like a web mp3 player so I can learn more.
Please give me more tests.
4
Name:
Anonymous
2008-05-07 13:10
Write a function that will generate the n first Fibonacci numbers
5
Name:
Anonymous
2008-05-07 13:18
substr x [] n = False
substr [] ys n = True
substr (x:xs) (y:ys) n = x == y && substr xs ys (n+1)
How do I output n (the position of first converging character) so that I don't screw the types? With Either?
6
Name:
Anonymous
2008-05-07 13:20
Go do the python challenge.
7
Name:
Anonymous
2008-05-07 13:21
>>4
Also,
fibs = 0 : 1 : 1 : zipWith (+) fibs (tail fibs)
8
Name:
Anonymous
2008-05-07 13:22
Never-mind, I just got trolle.d
9
Name:
Anonymous
2008-05-07 15:19
The fibs and substring stuff is too easy.
Also I have done the first 5 or 6 in the pychal.
I will write some classes for web apis and an irc bot.
10
Name:
Anonymous
2008-05-07 15:39
write a bbcode c preprocessor
11
Name:
Anonymous
2008-05-07 16:26
h
a
x
m
y
a
n
u
s
12
Name:
Anonymous
2008-05-07 16:31
Write a bbcode-mode for EMACS.
Oh wait u cant
LOL!!
13
Name:
Anonymous
2008-05-07 16:35
>>3 needs to read
http://en.wikipedia.org/wiki/String_searching_algorithm
anyways, doesn't really matter because
>>2 was fairly lame
my idea: conway's game of life using ncurses
14
Name:
Anonymous
2008-05-07 16:38
h
a
x
m
y
a
n
u
s
15
Name:
Anonymous
2008-05-07 16:38
h
a
x
m
y
a
n
u
s
16
Name:
Anonymous
2008-05-07 16:52
>>1
Try making a web server in python. It's very fun because you can have 'live' content made in python scripts.
17
Name:
Anonymous
2008-05-07 17:50
>>16
import BaseHTTPServer, SimpleHTTPServer
BaseHTTPServer.HTTPServer(('', 8080), SimpleHTTPServer.SimpleHTTPRequestHandler).serve_forever()
18
Name:
Anonymous
2008-05-07 18:25
blowup l =
concatMap (\(x,y) -> replicate x y) (zip [1..length l] l)
19
Name:
Anonymous
2008-05-07 18:28
Actually,
blowup l =
concatMap (uncurry replicate) (zip [1..length l] l)
20
Name:
Anonymous
2008-05-07 18:58
>>19
map (uncurry f) (zip xs ys) ≣
zipWith f xs ys
21
Name:
Anonymous
2008-05-07 19:00
I once tried to do (uncurry Ciel). The next day, I woke up with my ass all sore, like someone tried to suppress Roa in it.
22
Name:
Anonymous
2008-05-07 19:17
>>21
back to /jp/, please
23
Name:
Anonymous
2008-05-07 19:54
>>22
But how did you understand the joke in the first place, huh?
24
Name:
Anonymous
2008-05-07 19:55
>>23
That's not the point
25
Name:
Anonymous
2008-05-07 20:32
write a library that allows you to to bit-level file input and output
i.e. you can do
file.write(1) and it will write 1 bit
file.write(0) and it will write 0 bit
you can also do neat thigns like create wrappers for these
i.e. create
file.write_one_bit()
file.write_zero_bit()
and then you can do even more cool things like
file.write_random_bit()
make it a very robust library and maybe you can make a PEP.
26
Name:
Anonymous
2008-05-07 21:00
27
Name:
Anonymous
2008-05-07 21:11
>>25
I lol'd. That would be the most hard core library ever.
*Holds up spork()*
28
Name:
Anonymous
2008-05-07 21:14
29
Name:
Anonymous
2008-05-07 21:17
30
Name:
Anonymous
2008-05-08 21:53
>>25
As I am not an
EXPERT PROGRAMMER I do not know why that would be useful. Please explain.
31
Name:
Anonymous
2008-05-09 1:15
>>30
I guess you could say it's only a
bit useful.
32
Name:
weird
2008-05-09 2:32
this is a cool forum
33
Name:
Anonymous
2008-05-09 3:56
>>32
go back to reddit plz
34
Name:
Anonymous
2008-05-09 4:03
While looking for info on artist-mode , I stumbled upon a reddit page about it. Now I know why you hate it with passion.
36
Name:
Anonymous
2009-03-07 3:15
This is at the end of the python tutorial I am trying to work through. I have no idea if this is of your level:
Create your own command-line address-book program using which you can add,
modify, delete or search for your contacts such as friends, family and colleagues
and their information such as email address and/or phone number. Details must
be stored for later retrieval.
37
Name:
Anonymous
2009-03-07 7:36
Write a function that generates a perfect sudoku on it's first attempt. It's bloody hard.
38
Name:
Anonymous
2009-03-07 9:44
>>37
sub sudoku {
print "7 2 6 4 9 3 8 1 5\n3 1 5 7 2 8 9 4 6\n4 8 9 6 5 1 2 3 7\n8 5 2 1 4 7 6 9 3\n6 7 3 9 8 5 1 2 4\n9 4 1 3 6 2 7 5 8\n1 9 4 8 3 6 5 7 2\n5 6 7 2 1 4 3 8 9\n2 3 8 5 7 9 4 6 1\n";
}
39
Name:
Anonymous
2009-03-07 9:58
>>38
I meant a random one... I'm not even going to check if that's a legal sudoku either.
40
Name:
Anonymous
2009-03-07 10:14
>>39
Who are you to say that this sudoku is not a random one?
41
Name:
Anonymous
2009-03-07 10:35
42
Name:
Anonymous
2009-03-07 10:42
>>41
THE SUSSMAN is smarter than that.
43
Name:
Anonymous
2009-03-07 10:52
>>42
THE SUSSMAN was
EXPERT TROLLING you
44
Name:
Anonymous
2009-03-07 10:55
>>43
THE SUSSMAN closed his eyes so that the sudoku would have no preconceptions about the room being random.
45
Name:
Anonymous
2009-03-07 15:22
THE SUSSSSSSSSSSSSSSSSSSSSSSSMAN
46
Name:
Anonymous
2009-03-07 15:28
>>1
Take the 6.01 class at MIT.
47
Name:
Anonymous
2009-03-07 15:29
[b] [u] [sup] SUSSMAN! [/u] [/b]
48
Name:
Anonymous
2009-03-07 15:29
FUCK
[b] [u] [sup] S[sup] USSMAN! [/u] [/b] [b] [u] [sup] S[sup] USSMAN! [/u] [/b] [b] [u] [sup] S[sup] USSMAN! [/u] [/b] [b] [u] [sup] S[sup] USSMAN! [/u] [/b] [b] [u] [sup] S[sup] USSMAN! [/u] [/b] [b] [u] [sup] S[sup] USSMAN! [/u] [/b] [b] [u] [sup] S[sup] USSMAN! [/u] [/b] [b] [u] [sup] S[sup] USSMAN! [/u] [/b]
49
Name:
Anonymous
2009-03-07 15:30
>>48
HOLY SHIT FUCKDAMN SHITCUNTS
SUSSMAN!
SUSSMAN!
SUSSMAN!
SUSSMAN!
SUSSMAN!
SUSSMAN!
50
Name:
Anonymous
2009-03-07 15:31
SUSSMAN! SUSSMAN! SUSSMAN! SUSSMAN! SUSSMAN! SUSSMAN! SUSSMAN!
SUSSMAN! SUSSMAN! SUSSMAN! SUSSMAN! SUSSMAN! SUSSMAN! SUSSMAN!
SUSSMAN! SUSSMAN! SUSSMAN! SUSSMAN! SUSSMAN! SUSSMAN! SUSSMAN!
51
Name:
Lucky 7 Sussmen
2009-03-07 15:32
SUSSMAN! SUSSMAN! SUSSMAN! SUSSMAN! SUSSMAN! SUSSMAN! SUSSMAN!
SUSSMAN! SUSSMAN! SUSSMAN! SUSSMAN! SUSSMAN! SUSSMAN! SUSSMAN!
SUSSMAN! SUSSMAN! SUSSMAN! SUSSMAN! SUSSMAN! SUSSMAN! SUSSMAN!
SUSSMAN! SUSSMAN! SUSSMAN! SUSSMAN! SUSSMAN! SUSSMAN! SUSSMAN!
SUSSMAN! SUSSMAN! SUSSMAN! SUSSMAN! SUSSMAN! SUSSMAN! SUSSMAN!
SUSSMAN! SUSSMAN! SUSSMAN! SUSSMAN! SUSSMAN! SUSSMAN! SUSSMAN!
SUSSMAN! SUSSMAN! SUSSMAN! SUSSMAN! SUSSMAN! SUSSMAN! SUSSMAN!
52
Name:
Anonymous
2009-03-07 16:03
[b] [i] [sup] [sup] [u] S[sup] U[sup] [/u] [o] SS M A N ! [/sup] [/sup] [/sup] [/sup] [/i] [/b]
53
Name:
Anonymous
2009-03-07 16:04
>>52
fuck damn shit cunts
54
Name:
Anonymous
2009-03-07 16:06
55
Name:
Anonymous
2009-03-07 17:38
56
Name:
Anonymous
2009-03-07 18:52
[sup][sup][sup]
58
Name:
Anonymous
2011-02-03 6:18