hello
im smruti from orissa doing my final yr btect in cse.i want to do project on python.i need some good project ideas using python
5 Replies  5412 Views  Last Post: 10 September 2009  02:38 PM
Replies To: project in python
#3
Re: project in python
Posted 07 September 2009  10:46 AM
Hey shadhin I'm actually working on a program called abacus. I have python 2.6.6 and I was wondering if I could use your gui calculator in my program. Here is why I have so far
it can also be seen here if you wish. See the reason that I'm asking for permission to edit the code and intergate it with my program is because my calculator (to be plain honest) sucks
def get_shape(): print "Which do you want to calculate?" print "1 Area of Circle" print "2 Area of Trapezoid" print "3 Area of Triangle" print "4 Area of Rectangle" print "5 Surface Area of Cone" print "6 Surface Area of Cylinder" print "7 Surface Area of Pyramaid" print "8 Surface Area of Sphere" print "9 Volume of Cone" print "10 Volume of Cylinder" print "11 Volume of a Rectangular Prism" print "12 Volume of Pyramaid" print "13 Volume of Sphere" shape = int(raw_input("Choose the shape: ")) return shape def get_choice(): print "Select what you want to do" print "1 Calculate Area & Volume" print "2 Basic Calculator" print "3 Exit" print "4 Credits" choice = int(raw_input()) return choice def get_selection(): print "Select what you want to do." print "1 Calculate Area & Volume" print "2 Credits" print "3 Exit" selection = int(raw_input("Select what you want to do: ")) return selection def main(): print "Welcome to Volume. Area. Conversion. (VAC)" print "VAC is a free mathmatical program that calculates volume, area, surface area,converts lengths, and temperatures." print "VAC was created by Rodrigue Achu" choice = get_choice() if choice ==1: selection = get_selection() if selection ==1: shape = get_shape() if shape ==1:#Area of Circle radius = input("Enter the radius: ") area = 3.14*(radius**2) print "The area is", area main() elif shape ==2:#Area of Trapezoid height = input ("Enter the height: ") baseone = input ("Enter the first base: ") basetwo = input ("Enter the second base: ") area = (.5*height)*(baseone+basetwo) print "The area is", area main() elif shape ==3: #Area of Triangle base = input("Enter the base: ") height = input ("Enter the height: ") area = base*height*.5 print "The area is", area main() elif shape ==4:#Area of Rectangle width = input ("Enter the width: ") height = input ("Enter the height: ") area = width*height print "The area is", area main() elif shape ==5:#Surface Area of Cone radius = input ("Enter the radius: ") length = input ("Enter the length: ") pi = 22.0/7.0 surfacearea = (pi*radius*length)+(pi*radius**2) print "The surface area is", surfacearea main() elif shape ==6:#Surface Area of Cylinder radius = input ("Enter the radius: ") height = input ("Enter the height: ") pi = 22.0/7.0 base = pi*radius*radius lateralarea = 2*pi*radius*height surfacearea = lateralarea + (base*2) print "The surface area is", surfacearea main() elif shape ==7:#Surface Area of Pyramaid base = input ("Enter one side of the base: ") height = input ("Enter the height: ") sidelength = input ("Enter the side length: ") surfacearea = (base*2*sidelength)+ (base**2) print "The surface area is", surfacearea elif shape ==8:#Surface Area of Sphere radius = input("Enter the radius: ") pi = 22.0/7.0 surfacearea = (4*pi)*(radius**2) print "The surface area is", surfacearea main() elif shape ==9:#Volume of Cone radius = input("Enter the radius: ") height = input("Enter the height: ") pi = 22.0/7.0 volume = (1/3)*pi*radius**2*height print "The volume is", volume main() elif shape ==10:#Volume of Cylinder radius = input("Enter the radius: ") height = input("Enter the height: ") pi = 22.0/7.0 volume = height*pi*(radius**2) print "The volume is", volume main() elif shape ==11:#Volume of Rectangular Prism length = input("Enter the length: ") width = input("Enter the width: ") height = input("Enter the height: ") volume = length*width*height print"The volume is", volume main() elif shape ==12:#Volume of Pyramaid height = input("Please enter the height: ") base = input("Please enter one side of the base: ") volume = (1/3)*(base**2)*(height) main() elif shape ==13:#Volume of Sphere radius = input("Please enter the radius: ") pi = 22.0/7.0 volume = (4/3)*(pi)*(radius**3) print "The volume is", volume main() else: # selection ==2 print "VAC was made by RFA with help from Kdoiron, and several other people" main() if choice ==2: # choice ==2 def get_menu(): print "Welcome to VAC's basic calculator" print "Enter the equation you wish to solve" print "Ex: 5+5, 5*5, 5/5, etc." print "Please note that to raise a power use **, for ex: 5**2 = 5*5 = 5^2" equation = input("Enter the equation you wish to solve: ") solution = equation*1 print "the answer is", solution return solutioun get_menu() if choice ==3: # choice == 3 x = 20 while x>= 1: print "VAC is now closing" x = x1 if choice ==4: print "VAC was made by RFA with help from Kdoiron, and several other people" main() main()
it can also be seen here if you wish. See the reason that I'm asking for permission to edit the code and intergate it with my program is because my calculator (to be plain honest) sucks
This post has been edited by Rodrigue: 07 September 2009  11:47 AM
#4
Re: project in python
Posted 07 September 2009  03:35 PM
In my gui calculator, i have used easygui module. I have checked your code. If you wish you can use it to your program also. Here is how to get started with easygui. Or if you feel comfort, then you can also edit Simple GUI Calculator code.
#5
Re: project in python
Posted 07 September 2009  09:00 PM
Have you checked out pyGame? It makes it super easy to make a graphical game(2d or 3d) anyway you want.
#6
Re: project in python
Posted 10 September 2009  02:38 PM
smruti1423, on 7 Sep, 2009  02:26 AM, said:
hello
im smruti from orissa doing my final yr btect in cse.i want to do project on python.i need some good project ideas using python
im smruti from orissa doing my final yr btect in cse.i want to do project on python.i need some good project ideas using python
I did a Battle Bot program in Python for a class once and had fun doing it. We had to make modules for moving forward, moving backwards, attacking an opponent, fuel, ammo, etc. I enjoyed it much more than those that chose the Payroll program, boring!
Page 1 of 1
