473,657 Members | 2,567 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Programming exercises/challenges

Hi guys,

I'm learning Python by teaching myself, and after going through several
tutorials I feel like I've learned the basics. Since I'm not taking a
class or anything, I've been doing challenges/programs to reinforce the
material and improve my skills. I started out with stuff like "Guess my
number" games, hangman, etc. and moved on to making poker and card
games to work with classes. For GUIs I created games like minesweeper,
and a GUI stock portfolio tracker. I am out of ideas and am looking for
programming projects, challenges, or programs that have helped you'll
learn. I'm working on the project Euler problems, but I find that they
don't really help my programming skills; they are more math focused.
Suggestions? What has been useful or interesting to you? I'd also
welcome sources of textbook type problems, because the ones provided in
tutorials tend to be repetitive.

Thanks,
Ben
Nov 19 '08 #1
13 3112
On Nov 18, 6:39�pm, btk...@email.un c.edu wrote:
Hi guys,

I'm learning Python by teaching myself, and after going through several
tutorials I feel like I've learned the basics. Since I'm not taking a
class or anything, I've been doing challenges/programs to reinforce the
material and improve my skills. I started out with stuff like "Guess my
number" games, hangman, etc. and moved on to making poker and card
games to work with classes. For GUIs I created games like minesweeper,
and a GUI stock portfolio tracker. I am out of ideas and am looking for
programming projects, challenges, or programs that have helped you'll
learn. I'm working on the project Euler problems, but I find that they
don't really help my programming skills; they are more math focused.
Suggestions? What has been useful or interesting to you?
Math problems. :-)
I'd also
welcome sources of textbook type problems, because the ones provided in
tutorials tend to be repetitive.
I read rec.puzzles regularly and always approach each puzzle
in a "how would I solve this with a program" way. Not all
lend themselves to computer solutions, some of the regulars
there frown on computer answers and some are simply math
problems in disguise. I follow sci.math for the same reason.

And alt.math. And alt.math.recrea tional.

Another hobby I have is tracking movie box-office receipts
(where you can make interesting graphs comparing Titanic
to Harry Potter or how well the various sequels do, if Pierce
Brosnan saved the James Bond franchise, what can you say about
Daniel Craig?). Lots of potential database problems there.
Not to mention automating the data collection from the Internet
Movie Database by writing a web page scraper than can grab
six months worth of data in a single session (you probably
wouldn't need this if you cough up a subscription fee for
professional access, but I'm not THAT serious about it).

There is nothing like such a hobby to provide motivation to
learn programming.

Here's something interesting: take a films opening weekend
box-office receipts and multiply it by Pi. You'll get the
film's total gross.
>
Thanks,
Ben
Nov 19 '08 #2
On Wed, Nov 19, 2008 at 2:39 AM, Mensanator <me********@aol .comwrote:
Another hobby I have is tracking movie box-office receipts
(where you can make interesting graphs comparing Titanic
to Harry Potter or how well the various sequels do, if Pierce
Brosnan saved the James Bond franchise, what can you say about
Daniel Craig?). Lots of potential database problems there.
Not to mention automating the data collection from the Internet
Movie Database by writing a web page scraper than can grab
six months worth of data in a single session (you probably
wouldn't need this if you cough up a subscription fee for
professional access, but I'm not THAT serious about it).
This is really interesting. What would one need to do such a thing?
The only program web related I did in Python was generating a rss feed
from a local newspaper static site, using BeautifulSoup. But I never
put it on an online host. I'm not even sure if I could run. What
requisites should have the host to run python code?

Thanks and sorry for the meddling.
Nov 19 '08 #3
On Wed, Nov 19, 2008 at 1:35 PM, Jeremiah Dodds
<je************ @gmail.comwrote :
>
Personally, I prefer a host that gives me root on a box (or virtual
machine). I've had a great time with slicehost (http://slicehost.com).
Yes, I knew about slicehost, but it is expensive for what I need to
do, that is just experimentin a bit.
There are a few hosts that specialize in, or explicitly offer python
hosting, http://wiki.python.org/moin/PythonHosting has an overview of them.
Thanks for the link, seems useful.
Nov 19 '08 #4
On Nov 18, 6:39*pm, btk...@email.un c.edu wrote:
Hi guys,

I'm learning Python by teaching myself, and after going through several
tutorials I feel like I've learned the basics. Since I'm not taking a
class or anything, I've been doing challenges/programs to reinforce the
material and improve my skills. I started out with stuff like "Guess my
number" games, hangman, etc. and moved on to making poker and card
games to work with classes. For GUIs I created games like minesweeper,
and a GUI stock portfolio tracker. I am out of ideas and am looking for
programming projects, challenges, or programs that have helped you'll
learn. I'm working on the project Euler problems, but I find that they
don't really help my programming skills; they are more math focused.
Suggestions? What has been useful or interesting to you? I'd also
welcome sources of textbook type problems, because the ones provided in
tutorials tend to be repetitive.

Thanks,
Ben
You night look at "Useless Python" (you'll have to Google for the
site). It has tons of problems from trivial to complex.
--greg
Nov 19 '08 #5
On Wed, Nov 19, 2008 at 1:50 PM, Jeremiah Dodds
<je************ @gmail.comwrote :
If you need to do it on the extremely cheap, you can host on your own
machine on a port other than 80, make sure your router / firewall is
forwarding the port to your machine, and use dyndns (http://dyndns.com) to
give yourself a domain name. CherryPy (http://cherrypy.org) makes the python
side of hosting a simple service or app quite painless. I use this method to
host a little app for downloading Ubuntu packages and their dependencies as
a tarfile on my personal machine.
Thanks, I'll try.

To turn back in topic, there is the python challenge:
http://www.pythonchallenge.com/
I started it when I was learning Python, but since the beginning it is
not as simple as they say on the site. It maybe stimulating.
Nov 19 '08 #6

On Nov 19, 2008, at 7:12 AM, Mr.SpOOn wrote:
On Wed, Nov 19, 2008 at 2:39 AM, Mensanator <me********@aol .com>
wrote:
>Another hobby I have is tracking movie box-office receipts
(where you can make interesting graphs comparing Titanic
to Harry Potter or how well the various sequels do, if Pierce
Brosnan saved the James Bond franchise, what can you say about
Daniel Craig?). Lots of potential database problems there.
Not to mention automating the data collection from the Internet
Movie Database by writing a web page scraper than can grab
six months worth of data in a single session (you probably
wouldn't need this if you cough up a subscription fee for
professional access, but I'm not THAT serious about it).

This is really interesting. What would one need to do such a thing?
The only program web related I did in Python was generating a rss feed
from a local newspaper static site, using BeautifulSoup. But I never
put it on an online host. I'm not even sure if I could run. What
requisites should have the host to run python code?
I'm not sure why you'd need to host the Python code anywhere other
than your home computer. If you wanted to pull thousands of pages from
a site like that, you'd need to respect their robots.txt file. Don't
forget to look for a crawl-delay specification. Even if they don't
specify one, you shouldn't let your bot hammer their servers at full
speed -- give it a delay, let it run in the background, it might take
you three days versus an hour to collect the data you need but that's
not too big of deal in the service of good manners, is it?

You might also want to change the user-agent string that you send out.
Some sites serve up different content to bots than to browsers.

You could even use wget to scrape the site instead of rolling your own
bot if you're more interested in the data manipulation aspect of the
project than the bot writing.

Enjoy
Philip

Nov 19 '08 #7
On Wed, Nov 19, 2008 at 3:41 PM, Philip Semanchuk <ph****@semanch uk.comwrote:
I'm not sure why you'd need to host the Python code anywhere other than your
home computer. If you wanted to pull thousands of pages from a site like
that, you'd need to respect their robots.txt file. Don't forget to look for
a crawl-delay specification. Even if they don't specify one, you shouldn't
let your bot hammer their servers at full speed -- give it a delay, let it
run in the background, it might take you three days versus an hour to
collect the data you need but that's not too big of deal in the service of
good manners, is it?
Mmm, I didn't really mean the possibility to just host the code, but
to run. I mean, like server side code, so that my programs keep
running and updating, in my case, the RSS feed, without the need for
me to be online and run it.
Nov 19 '08 #8
Edwin <ex****@gmail.c omwrites:

[...]
a diary manager compatible with my Emacs diary file (sometimes I don't
want to open Emacs for a quick note)
You mean that you sometimes don't have emacs open?

--
Arnaud
Nov 20 '08 #9
On Nov 20, 12:39*am, Arnaud Delobelle <arno...@google mail.comwrote:
Edwin <exp...@gmail.c omwrites:

[...]
a diary manager compatible with my Emacs diary file (sometimes I don't
want to open Emacs for a quick note)

You mean that you sometimes don't have emacs open?

--
Arnaud
heh... I believe in the potpourri style mate (and I don't mean petals
and spices).
After all I'm no expert.
Nov 20 '08 #10

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

Similar topics

4
2422
by: Mark | last post by:
Hello. I am new to programming and Python and was wondering if someone could help get me started. I picked Python to start learning to prgram because of some things I have read about it (easy to learn, object oriented, clear syntax, etc...). Can anyone assist in getting me started with learning to program and Python? Recommended reading material? Online tutorials? Recommended development tools (wxpython, pythonwin, etc...)? I am a...
8
5430
by: Wous Mant | last post by:
Hello, I am a student in an university and studying C++.Final exams are coming.I'd like to solve as much exercises as possible.I'd like you to test myself with different kind of exercises.Do you know any website where there are exercises with solutions so I can try to solve them and can look at the solutions when I'm stucked.I'd like to get exercises about; Strings Arrays Pointers
5
1425
by: Mr. X | last post by:
Hello, Let me begin by saying that I am a strong advocate of science, math and engineering students learning to program... just a skill that they need to experience even if they go another path. So, what kind: The LabView kind where graphical icons are wired together? The MatLab kind in which programs are built using programs? Or the C programming kind?
42
2882
by: Kevin Spencer | last post by:
Is it just me, or am I really observing a trend away from analysis and probem-solving amongst programmers? Let me be more specific: It seems that every day, in greater numbers, people are coming to these programming newsgroups and asking for ready-made solutions to fairly simple programming problems. They either want someone to write code for them, or point them to a ready-made chunk of software that does what they need to do. Now, I'm...
18
1578
by: Frankie | last post by:
I have been hired to go to a former client of mine and train their staff programmers on ASP.NET. These guys have only Mainframe, MS Access, SQL Server, and VB6 desktop application development experience (with absolutely no HTML or Web application experience). Before jumping into any code I think it's important to get them to understand the fundamental differences and unique challenges presented by Web application development (independent...
9
1806
by: Ajinkya | last post by:
Me along with some of my friends have formed a programming group on google to discuss programming problem approaches.... Do join it will be helpful to all beginners and experts same. Here is the link to it : http://groups.google.co.in/group/programming-challenges Ciao, Ajinkya.
5
1892
by: Martin | last post by:
I am trying to improve my Python skills through some exercises. Currently I am working on Larry's "15 exercises to know a programming language " (http://www.knowing.net/ PermaLink,guid,f3b9ba36-848e-43f8-9caa-232ec216192d.aspx). The first exercise is this: "Write a program that takes as its first argument one of the words 'sum,' 'product,' 'mean,' or 'sqrt' and for further arguments a series of numbers. The program applies the...
0
643
by: Stef Mientki | last post by:
hi Ben, btkuhn@email.unc.edu wrote: I'm working on an open source alternative for MatLab / LabView (math again ;-) and there's still a lot to do - (re-)design of the core engine (multi thread ?) - implementation of webkit under wxPython - integration of Scintilla and rpdb2
0
8397
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8310
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8827
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8732
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8503
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8605
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4158
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
1620
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.