Trig Program
In Python, I have an executable in vb.net that im still playing with. It's simple but its my first program.
print "Trigonometry Solver Circles - Lemur" x = 0 while (x == 0): x = float(input("x: ")) y = float(input("y: ")) r1 = x2 + y2 r = r1**0.5 print "x = ",x," | ","y = ",y," | ","Radius = ",r print "Sine = ",y,"/",r print "Cosine = ",x,"/",r print "Tangent = ",y,"/",x print "Cosecant = ",r,"/",y print "Secant = ",r,"/",x print "Cotangent = ",x,"/",y print "Done! Next?" print "Please select one of the following" print "1. Again" print "2. Exit" x = input("1 or 2: ") if x == 2: import sys sys.exit() else: print "Next?"
note to self- disable smileys next timeā¦
It's alright for what you're doing, but it's just a wrapper for already existent calculator functions geared toward.. exactly what you're doing. How much time does it realistically save you? With a basic understanding of trigonometry, one can do all that you've done in one's head; with large numbers dealing with more precision, you're likely to just need a normal calculator or a more complex software suite like MatLab if your intention is to do more with the data.
Tony wrote: It's alright for what you're doing, but it's just a wrapper for already existent calculator functions geared toward.. exactly what you're doing. How much time does it realistically save you? With a basic understanding of trigonometry, one can do all that you've done in one's head; with large numbers dealing with more precision, you're likely to just need a normal calculator or a more complex software suite like MatLab if your intention is to do more with the data.
that may be so, but really great things have to be worked towards. you can't expect a first program to be phenominal, you have to start small and work your way towards more advanced material. lemur wasnt trying to show off, just get some helpful feedback about a beginners level program.
@lemur- looks like a good start. what i did when learning python was just come up with a 'mission' every few days that sounded like it could be difficult but within my current capabilities. just keep at it, i've found python to be a very useful language once you've gotten to know it fairly well. if you get stuck anywhere feel free to pm me.
ynori7 wrote: that may be so, but really great things have to be worked towards. you can't expect a first program to be phenominal, you have to start small and work your way towards more advanced material. lemur wasnt trying to show off, just get some helpful feedback about a beginners level program.
python to be a very useful language once you've gotten to know it fairly well. if you get stuck anywhere feel free to pm me.
First of all, did I not say it's alright for what he is doing? Why should there be any positive reinforcement given beyond that, especially given that he can very easily deduce that the program is functional based on that fact that it.. works? He's the one who went through the experience. He doesn't need more positive reinforcement than that.
I didn't even begin to imply he was trying to show off. I was perfectly objective with my post. It wasn't pejorative, it wasn't off subject, nothing. Perfectly on point.
You obviously favor hand-holding. I don't. By the way, any language is useful when you know it fairly well. That was a bit obviously. Python probably wasn't even the best for this subject; it could've been done more efficiently in Python, or even shell scripting for that matter. Python is just fine for this, but so are many languages.
Remade it in VB.net to see how that worked and on terms of python im still reading on the GUI section, I'm more interested right now in databasing which is the next chapter, I have quite a few mini-programs for loops and conditionals and other things like that. More over its just seeing what all I can learn.
As with everything I don't expect to be a pro in a few days, heck, it took me 1-2 years to get good in art, and so far about 4 months to get where I am in hacking, so patience is no big deal in learning to me.