Projects for the Beginner

Reply

Join Date: Jul 2009
Posts: 170
Reputation: masterofpuppets is an unknown quantity at this point 
Solved Threads: 40
masterofpuppets's Avatar
masterofpuppets masterofpuppets is offline Offline
Junior Poster
 
1
  #201
Oct 15th, 2009
maybe a simple program to take a string and print it out backwards
Then extend the program to check whether a word is a palindrome, i.e can be read the same way in either direction.
Further extension is to configure the program to determine whether a whole sentence is a palindrome.
Hint: remove all non-letter characters from the string first, including whitespaces
My site ->> http://8masterofpuppets8.webs.com/
"My belief is stronger than your doubt."
Reply With Quote Quick reply to this message  
Join Date: Jul 2009
Posts: 170
Reputation: masterofpuppets is an unknown quantity at this point 
Solved Threads: 40
masterofpuppets's Avatar
masterofpuppets masterofpuppets is offline Offline
Junior Poster
 
0
  #202
Oct 16th, 2009
write a program to find the factorial of a number.
Hint: the program can be written in two ways - using a proper algorithm, or using recursion algorithm

P.S sorry in this is already posted in the forum...i didn't read all previous posts
My site ->> http://8masterofpuppets8.webs.com/
"My belief is stronger than your doubt."
Reply With Quote Quick reply to this message  
Join Date: Jul 2009
Posts: 170
Reputation: masterofpuppets is an unknown quantity at this point 
Solved Threads: 40
masterofpuppets's Avatar
masterofpuppets masterofpuppets is offline Offline
Junior Poster
 
0
  #203
22 Days Ago
Design a simple text-based calculator program that does all the simple calculations like addition, subtraction, multiplication and division. The program should have a menu and should prompt the user to enter an operation and print the result from that operation. Simple interaction would look like this:

  1. >>>Available operations:
  2. 1. Addition
  3. 2. Subtraction
  4. 3. Multiplication
  5. 4. Division
  6.  
  7. Choose an operation: 1
  8. Enter first number: 2
  9. Enter second number: 3
  10. 2 + 3 = 5
  11.  
  12. Available operations:
  13. ....
  14. ....
Hint: divide the program into separate functions for each operation and for the menu as well

More advances stuff:
add the option conversion from binary to decimal and vice-versa
Last edited by masterofpuppets; 22 Days Ago at 11:21 am.
My site ->> http://8masterofpuppets8.webs.com/
"My belief is stronger than your doubt."
Reply With Quote Quick reply to this message  
Join Date: Oct 2006
Posts: 2,275
Reputation: sneekula has a spectacular aura about sneekula has a spectacular aura about 
Solved Threads: 175
sneekula's Avatar
sneekula sneekula is offline Offline
Nearly a Posting Maven
 
0
  #204
21 Days Ago
Here is a simple number project:

Prime numbers are positive integer numbers that are only divisible by itself or one. For example 2, 3, 5, 7, 11, 13, 17, are prime numbers, by convention 1 is not a prime number.

Palindrome numbers are numbers in which the decimal digits are the same read left to right as they are read right to left. For example 77, 131, 1441.

Your mission is to write a script that determines and prints all palindrome prime numbers less than 100000. Exclude the simple stuff like one digit numbers.
No one died when Clinton lied.
Reply With Quote Quick reply to this message  
Join Date: May 2006
Posts: 1,810
Reputation: ithelp is a name known to all ithelp is a name known to all ithelp is a name known to all ithelp is a name known to all ithelp is a name known to all ithelp is a name known to all 
Solved Threads: 117
ithelp's Avatar
ithelp ithelp is offline Offline
Posting Virtuoso
 
-1
  #205
20 Days Ago
Write a python program which will take DNA map of parents and childs as input and determine whether the child belong to the parent or not
Reply With Quote Quick reply to this message  
Join Date: Oct 2004
Posts: 3,941
Reputation: vegaseat is just really nice vegaseat is just really nice vegaseat is just really nice vegaseat is just really nice vegaseat is just really nice 
Solved Threads: 911
Moderator
vegaseat's Avatar
vegaseat vegaseat is offline Offline
DaniWeb's Hypocrite
 
0
  #206
20 Days Ago
This Tinter GUI toolkit program draws a rather ugly stick man ...
  1. # exploring Tkinter's canvas drawing surface
  2. # draw lines and ovals to form a stick man
  3. # info at http://effbot.org/tkinterbook/canvas.htm
  4.  
  5. try:
  6. # Python2
  7. import Tkinter as tk
  8. except ImportError:
  9. # Python3
  10. import tkinter as tk
  11.  
  12. def body(w, h):
  13. """draw the oval for the body"""
  14. # an oval is drawn within a given rectangle
  15. # (x1, y1, x2, y2) upper left and lower right corner coordinates
  16. # of the rectangle the ellipse is bound by
  17. # calculate coordinates relative to width w and height h
  18. rect = (w//2-80, h//2-150, w//2+80, h//2+80)
  19. canvas.create_oval(rect, fill='red')
  20.  
  21. def head(w, h):
  22. """draw the oval/circle for the head"""
  23. # if the bounding rectangle is a square a circle is drawn
  24. rect = (w//2-40, h//2-230, w//2+40, h//2-150)
  25. canvas.create_oval(rect, fill='red')
  26.  
  27. def arms(w, h):
  28. """draw lines for right and left arm"""
  29. # draw line from coordinate points x1, y1 to x, y2
  30. # left arm
  31. canvas.create_line(w//2-66, h//2-100, w//2-166, h//2-50)
  32. # right arm
  33. canvas.create_line(w//2+66, h//2-100, w//2+166, h//2-50)
  34.  
  35. def legs(w, h):
  36. """draw lines for right and left legs"""
  37. # draw line from coordinate points x1, y1 to x, y2
  38. # left leg
  39. canvas.create_line(w//2-55, h//2+50, w//2-76, h//2+190)
  40. # right leg
  41. canvas.create_line(w//2+55, h//2+50, w//2+76, h//2+190)
  42.  
  43.  
  44. # create the main window
  45. root = tk.Tk()
  46. root.title("Fred Stickman")
  47.  
  48. # create the drawing canvas
  49. w = 400
  50. h = 500
  51. canvas = tk.Canvas(root, width=w, height=h, bg='white')
  52. canvas.pack()
  53.  
  54. body(w, h)
  55. head(w, h)
  56. arms(w, h)
  57. legs(w, h)
  58.  
  59. # start the GUI event loop
  60. root.mainloop()
Should you be interested, experiment with the drawing and make Fred Stickman look more like a movie star.
May 'the Google' be with you!
Reply With Quote Quick reply to this message  
Join Date: Oct 2004
Posts: 3,941
Reputation: vegaseat is just really nice vegaseat is just really nice vegaseat is just really nice vegaseat is just really nice vegaseat is just really nice 
Solved Threads: 911
Moderator
vegaseat's Avatar
vegaseat vegaseat is offline Offline
DaniWeb's Hypocrite
 
0
  #207
13 Days Ago
Create a test directory on your hard drive, copy some files and other directories into it. Now explore Python's file management functions and do the following:
1) list all the files in a given directory
2) list all the files in a given directory and its sub directories
3) list all the files with a given extension
4) copy files from one directory into another directory
5) total up all the file sizes in a given directory
6) find the largest or smallest file in a directory
7) find all the files past a certain cutoff date
8) search all the text files for a given word or sentence
9) change file names and creation dates
May 'the Google' be with you!
Reply With Quote Quick reply to this message  
Join Date: Nov 2009
Posts: 3
Reputation: pizte is an unknown quantity at this point 
Solved Threads: 0
pizte pizte is offline Offline
Newbie Poster
 
0
  #208
11 Hours Ago
1) Write a handy tool like a notes program (you must learn to handle files, strings and GUI)

2) Write a 'program in need' like an automated Gentoo portage updater (I'm making my own, and it's not quite easy, since I support mailing reports, and other portage related tools upgrading like layman, eix or similar)

3) Get an already made program and try to do your own implementation without watching the source code (this is a bit advanced) for example ¿anyone remembers the "Blade: The Edge of Darkness" game? It was done on python.
Reply With Quote Quick reply to this message  
Reply

Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC