dansackett/Projects

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

I saw this project on and loved the idea of applying my Python knowledge to it. This is both practice and learning for me as I try and take on each problem with a fresh slate. A lot of the problems come from Martyr2’s Mega Project List while some others have appeared from other sources or my own mind. Feel free to follow along and fork this repo to work on the problems yourself.

Some points:

  • I chose to do all of these in Python to explore the language even further and see how far I can push it.
  • I may not be able to complete all of these.
  • Some of my solutions may not be ideal or the "best way". I'd love to hear ideas on how you'd do this since this is a learning exercise for me. Open an issue and let me know.
  • I've deleted some that didn't inerest me.

Find PI to the Nth Digit – Enter a number and have the program generate PI up to that many decimal places. Keep a limit to how far the program will go.

Fibonacci Sequence – Enter a number and have the program generate the Fibonacci sequence to that number or to the Nth number.

Prime Factorization – Have the user enter a number and find all Prime Factors (if there are any) and display them.

Next Prime Number – Have the program find prime numbers until the user chooses to stop asking for the next one.

Find Cost of Tile to Cover W x H Floor – Calculate the total cost of tile it would take to cover a floor plan of width and height, using a cost entered by the user.

Mortgage Calculator – Calculate the monthly payments of a fixed term mortgage over given Nth terms at a given interest rate. Also figure out how long it will take the user to pay back the loan.

Change Return Program – The user enters a cost and then the amount of money given. The program will figure out the change and the number of quarters, dimes, nickels, pennies needed for the change.

Binary to Decimal and Back Converter – Develop a converter to convert a decimal number to binary or a binary number to its decimal equivalent.

Calculator – A simple calculator to do basic operators. Make it a scientific calculator for added complexity.

Unit Converter (temp, currency, volume, mass and more) – Converts various units between one another. The user enters the type of unit being entered, the type of unit they want to convert to and then the value. The program will then make the conversion.

Alarm Clock – A simple clock where it plays a sound after X number of minutes/seconds or at a particular time.

Distance Between Two Cities – Calculates the distance between two cities and allows the user to specify a unit of distance. This program may require finding coordinates for the cities like latitude and longitude.

Credit Card Validator – Takes in a credit card number from a common credit card vendor (Visa, MasterCard, American Express, Discoverer) and validates it to make sure that it is a valid number (look into how credit cards use a checksum).

Tax Calculator – Asks the user to enter a cost and either a country or state tax. It then returns the tax plus the total cost with tax.

Factorial Finder - The Factorial of a positive integer, n, is defined as the product of the sequence n, n-1, n-2, ...1 and the factorial of zero, 0, is defined as being 1. Solve this using both loops and recursion.

Number Names - Show how to spell out a number in English. You can use a preexisting implementation or roll your own, but you should support inputs up to at least one million (or the maximum value of your language's default bounded integer type, if that's less). Optional: Support for inputs other than positive integers (like zero, negative integers, and floating-point numbers).

Josephus Problem - In computer science and mathematics, the Josephus Problem (or Josephus permutation) is a theoretical problem related to a certain counting-out game. There are people standing in a circle waiting to be executed. The counting out begins at some point in the circle and proceeds around the circle in a fixed direction. In each step, a certain number of people are skipped and the next person is executed. The elimination proceeds around the circle (which is becoming smaller and smaller as the executed people are removed), until only the last person remains, who is given freedom.

Happy Numbers - A happy number is defined by the following process. Starting with any positive integer, replace the number by the sum of the squares of its digits, and repeat the process until the number equals 1 (where it will stay), or it loops endlessly in a cycle which does not include 1. Those numbers for which this process ends in 1 are happy numbers, while those that do not end in 1 are unhappy numbers. Display an example of your output here. Find first 8 happy numbers.

Reverse a String – Enter a string and the program will reverse it and print it out.

Pig Latin – Pig Latin is a game of alterations played on the English language game. To create the Pig Latin form of an English word the initial consonant sound is transposed to the end of the word and an ay is affixed (Ex.: "banana" would yield anana-bay). Read Wikipedia for more information on rules.

Count Vowels – Enter a string and the program counts the number of vowels in the text. For added complexity have it report a sum of each vowel found.

Check if Palindrome – Checks if the string entered by the user is a palindrome. That is that it reads the same forwards as backwards like “racecar”

Count Words in a String – Counts the number of individual words in a string. For added complexity read these strings in from a text file and generate a summary.

Text Editor – Notepad style application that can open, edit, and save text documents. Add syntax highlighting and other features.

RSS Feed Creator – A program which can read in text from other sources and put it in RSS or Atom news format for syndication.

Post it Notes Program – A program where you can add text reminders and post them. You can have the program also add popup reminders.

Fortune Teller (Horoscope) – A program that checks your horoscope on various astrology sites and puts them together for you each day.

Vigenere / Vernam / Ceasar Ciphers – Functions for encrypting and decrypting data messages. Then send them to a friend.

Random Gift Suggestions – Enter various gifts for certain people when you think of them. When its time to give them a gift (xmas, birthday, anniversary) it will randomly pick one and perhaps places you can get it.

Markdown to HTML Converter - Converts Markdown formatted text into HTML files. Implement basic tags like p, strong, em etc. Optional: Implement all tags from Markdown Syntax Docs.

CD Key Generator – Generates a unique key for your applications to use based on some arbitrary algorithm that you can specify. Great for software developers looking to make shareware that can be activated.

Regex Query Tool – A tool that allows the user to enter a text string and then in a separate control enter a regex pattern. It will run the regular expression against the source text and return any matches or flag errors in the regular expression.

FTP Program – A file transfer program which can transfer files back and forth from a remote web sever.

Get Atomic Time from Internet Clock – This program will get the true atomic time from an atomic time clock on the Internet. There are various clocks across the world. Do a search for a list of them.

Chat Application (IRC or MSN Style) – Create a chat application that can create simple chat rooms like on Internet Relay Chat (IRC) or a more direct chatting style like MSN. For added complexity, create your own protocol to facilitate this chatting.

Fetch Current Weather – Get the current weather for a given zip/postal code.

Mail Checker (POP3 / IMAP) – The user enters various account information include web server and IP, protocol type (POP3 or IMAP) and the application will check for email on several accounts at a given interval.

Country from IP Lookup – Enter an IP address and find the country that IP is registered in.

Whois Search Tool – Enter an IP or host address and have it look it up through whois and return the results to you.

Zip / Postal Code Lookup – Enter a zip or postal code and have it return which city/cities that are in that zip code.

Site Checker with Time Scheduling – An application that attempts to connect to a website or server every so many minutes or a given time and check if it is up. If it is down, it will notify you by email or by posting a notice on screen.

Web Bot – An automated program which carries out tasks on the web including checking websites, page scraping, and summarization of data or web posting.

Product Inventory Project – Create an application which manages an inventory of products. Create a product class which has a price, id, and quantity on hand. Then create an inventory class which keeps track of various products and can sum up the inventory value.

Movie Store – Manage video rentals and controls when videos are checked out, due to return, overdue fees and for added complexity create a summary of those accounts which are overdue for contact.

Airline / Hotel Reservation System – Create a reservation system which books airline seats or hotel rooms. It charges various rates for particular sections of the plane or hotel. Example, first class is going to cost more than coach. Hotel rooms have penthouse suites which cost more. Keep track of when rooms will be available and can be scheduled.

Student Grade Book Application – Keep track of students (with a student class that has their name, average, and scores) in a class and their grades. Assign their scores on tests and assignments to the students and figure out their average and grade for the class. For added complexity put the students on a bell curve.

Bank Account Manager - Create a class called “Account” which will be an abstract class for three other classes called “CheckingAccount”, “SavingsAccount” and “BusinessAccount”. Manage credits and debits from these accounts through an ATM style program.

Library Catalog – Create a book class with a title, page count, ISBN and whether or not it is checked out or not. Manage a collection of various books and allow the user to check out books or return books. For added complexity generate a report of those books overdue and any fees. Also allow users to put books on reserve.

Patient / Doctor Scheduler – Create a patient class and a doctor class. Have a doctor that can handle multiple patients and setup a scheduling program where a doctor can only handle 16 patients during an 8 hr work day.

Recipe Creator and Manager – Create a recipe class with ingredients and a put them in a recipe manager program that organizes them into categories like deserts, main courses or by ingredients like chicken, beef, soups, pies etc.

Image Gallery – Create an image abstract class and then a class that inherits from it for each image type. Put them in a program which displays them in a gallery style format for viewing.

Shape Area and Perimeter Classes – Create an abstract class called “Shape” and then inherit from it other shapes like diamond, rectangle, circle, triangle etc. Then have each class override the area and perimeter functionality to handle each shape type.

Flower Shop Ordering To Go – Create a flower shop application which deals in flower objects and use those flower objects in a bouquet object which can then be sold. Keep track of the number of objects and when you may need to order more.

Vending Machine – Create an application which takes money and dispenses various types of candy or other item. The user enters a number and letter sequence, like D9, and have it return an instance of “Item” which of the proper type. Example when they press D9 it will return a type of candy bar which is an instance of Mr. GoodBar.

Josephus Problem – Create a program which links together various node objects and then every Nth object is removed until you have one object left. This last object is the sole survivor. Look it up on Google under “Josephus Algorithm”

Family Tree Creator – Create a class called “Person” which will have a name, when they were born and when (and if) they died. Allow the user to create these Person classes and put them into a family tree structure. Print out the tree to the screen.

Chat Application (remoting style) – Create a chat application which allows you to connect directly to another computer by their IP through the use of remoting and allow your “server” application handle multiple incoming connections.

Bulk Thumbnail Creator – Picture processing can take a bit of time for some transformations. Especially if the image is large. Create an image program which can take hundreds of images and converts them to a specified size in the background thread while you do other things. For added complexity, have one thread handling re-sizing, have another bulk renaming of thumbnails etc.

WYSIWG (What you see is what you get) Editor – Create an editor online which allows people to move around elements, create tables, write text, set colors etc for web pages without having to know HTML. Think Dreamweaver or FrontPage but for online sites. If you need an example check out the DIC page used to create a post.

Page Scraper – Create an application which connects to a site and pulls out all links, or images, and saves them to a list. For added complexity, organize the indexed content and don’t allow duplicates. Have it put the results into an easily searchable index file.

File Downloader – An application which can download various objects on a page including video streams or all files on a page. Great for pages with a lot of download links.

Password Safe – A program which keeps track of passwords for sites or applications and encrypts them with a key so that no one can read them.

Scheduled Auto Login and Action – Make an application which logs into a given site on a schedule and invokes a certain action and then logs out. This can be useful for checking web mail, posting regular content, or getting info for other applications and saving it to your computer.

E-Card Generator – Make a site that allows people to generate their own little e-cards and send them to other people. Can use flash or not. Use a picture library and perhaps insightful mottos or quotes.

Content Management System – Create a content management system (CMS) like Joomla, Drupal, PHP Nuke etc. Start small and allow for the addition of modules/addons later.

Template Maker – Make a site or application which allows the user to enter in various color codes, elements, dimensions and constructs a template file for a particular application like PHPBB, Invision Board, MySpace, Bebo, etc.

Quiz Maker – Make an application which takes various questions form a file, picked randomly, and puts together a quiz for students. Each quiz can be different and then reads a key to grade the quizzes.

File Explorer – Create your own windows explorer program but with added features, better searching, new icons and other views.

Sort File Records Utility – Reads a file of records, sorts them, and then writes them back to the file. Allow the user to choose various sort style and sorting based on a particular field.

Add Transactions In File and Find Averages – Read in a file of financial transactions, group them into accounts, add up fields or find averages or apply credits and debits to each account.

Create Zip File Maker – The user enters various files from different directories and maybe even another computer on the network and the program transfers them and zips them up into a zip file. For added complexity, apply actual compression to the files.

PDF Generator – An application which can read in a text file, html file or some other file and generates a PDF file out of it. Great for a web based service where the user uploads the file and the program returns a PDF of the file.

Bulk Renamer and Organizer – This program will take a series of files and renames them with a specific filename filter entered by the user. For instance if the user enters myimage###.jpg it will rename all files with a “minimum” of three numbers like “myimage001.jpg”, “myimage145.jpg” or even “myimage1987.jpg” since 1987 has at least three numbers.

Log File Maker – Make an application which logs various statistics in response to given events. This can be something that logs what an application does, what the system is doing, when something like a file changes etc.

Excel Spreadsheet Exporter – Create an online application which can read in a file and create an Excel Spreadsheet to export back. This can be through CVS or other file formats. For added complexity, see if you can create formula fields as well.

RPG Character Stat Creator – Make a program which will randomly create a character’s stats based on several rules set forth by the user. Have it generate a class, gender, strength/magic/dexterity points, and extra abilities or trades. Have it save it to a file which can then be printed out by a dungeon master.

File Copy Utility – Create a utility that can do bulk file copying and backups of other files.

Code Snippet Manager – Another utility program that allows coders to put in functions, classes or other tidbits to save for use later. Organized by the type of snippet or language the coder can quickly look up code. For extra practice try adding syntax highlighting based on the language.

Report Generator – Create a utility that generates a report based on some tables in a database. Generates a sales reports based on the order/order details tables or sums up the days current database activity.

Database Backup Script Maker – A program which reads a database’s objects, relationships, records and stored procedures and creates a .sql file which can then be imported into another database or kept as a backup file to rebuild the database with.

Event Scheduler and Calendar – Make an application which allows the user to enter a date and time of an event, event notes and then schedule those events on a calendar. The user can then browse the calendar or search the calendar for specific events. For added complexity, allow the application to create reoccurrence events that reoccur every day, week, month, year etc.

Budget Tracker – Write an application that keeps track of a household’s budget. The user can add expenses, income, and recurring costs to find out how much they are saving or losing over a period of time. For added complexity allow the user to specify a date range and see the net flow of money in and out of the house budget for that time period.

Address Book – Keep track of various contacts, their numbers, emails and little notes about them like a Rolodex in the database. For extra complexity, allow the user to connect to a website publish their address book based on specific options the user has set.

TV Show Tracker – Got a favorite show you don’t want to miss? Don’t have a PVR or want to be able to find the show to then PVR it later? Make an application which can search various online TV Guide sites, locate the shows/times/channels and add them to a database application. The database/website then can send you email reminders that a show is about to start and which channel it will be on.

Travel Planner System – Make a system that allows users to put together their own little travel itinerary and keep track of the airline / hotel arrangements, points of interest, budget and schedule.

Web Board (Forum) – Create a forum for you and your buddies to post, administer and share thoughts and ideas.

Slide Show – Make an application that shows various pictures in a slide show format. For extra complexity try adding various effects like fade in/out, star wipe and window blinds transitions.

Mind Mapper – Allow the user to put down ideas and quickly brainstorm how they are related into a mind map. The goal here is speed so let the user quickly write in an idea and drag it around in a visual map to show relationships.

YouTube Downloader – A program which can download videos to your hard drive from youtube.com. Save the files in various formats including FLV and AVI.

Image Browser – This application is used to view various image files on your computer from PNG, GIF, JPG to BMP, TIFF etc.

Traffic Light Application – See if you can make your own street light application and then put it into an intersection scenario. Don’t let any cars run the lights and crash into one another!

About

Working through over 100 programming problems in Python.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%