Blue88Comanche Posted January 13, 2013 Share Posted January 13, 2013 Last week i decided it was time i tough myself another language. I have been learning it rather quickly too. I am teaching myself, Python here is a program i wrote for our business: print "membership Calculator v0.5" #membership rates and fees #edit the number fields to change rates. single_per = 35 extra_per = 20 startup_1 = 15 startup_extra = 5 discount = 0.9 #but don't change after this point tanning = 0 anytime_health = 0 no_fee = 0 #questions print "How long is the membership (In months)" months = input () print "Is this a single membership or family? 1 = Single / 2 = Family" memberanswer = input () #single if memberanswer is 1: print "does this membership get a 10% discount? 1 = yes / 2 = no" discount_ans = input () if discount_ans is 1: single_per = single_per * discount print "Is there a Start up fee? 1 = yes / 2 = no" single_fee_ans = input () if single_fee_ans is 1: single_contract_fee = single_per * months + startup_1 single_contract = single_per * months down_pay = single_per + startup_1 bal = single_contract_fee - down_pay print "Does this membership get discount? 1 = yes / 2 = no" print "Single membership rate is %s dollars per month" % (single_per) print "plus a %s dollar start up fee" % (startup_1) print "Total year Membership cost %s dollars" % (single_contract_fee) print print #Contract fillout cheat sheet print "Contract Cheat sheet" print print "Membership --------- %s" % (single_contract) print "Tanning ------------ %s" % (tanning) print "Processing Fee ----- %s" % (startup_1) print "Anytime Health ----- %s" % (anytime_health) print "Total -------------- %s" % (single_contract_fee) print "Downpaymnt --------- %s" % (down_pay) print "Remaining Balance -- %s" % (bal) months_bal = months - 1 print "%s remainting payments" % (months_bal) print "at %s dollars per month" % (single_per) if single_fee_ans is 2: print "Single membership rate is %s dollars per month" % (single_per) single_contract = single_per * months down_pay = single_per bal = single_contract - down_pay print "Total year membership cost %s dollars" % (single_contract) print print #Contract fillout cheat sheet print "Contract Fill-out Cheat sheet" print print "Membership --------- %s" % (single_contract) print "Tanning ------------ %s" % (tanning) print "Processing Fee ----- %s" % (no_fee) print "Anytime Health ----- %s" % (anytime_health) print "Total -------------- %s" % (single_contract) print "Downpaymnt --------- %s" % (down_pay) print "Remaining Balance -- %s" % (bal) months_bal = months - 1 print "%s remainting payments" % (months_bal) print "at %s dollars per month" % (single_per) #secondary members if memberanswer is 2: print "How many Secondary Members?" secondary = input () membership_per = secondary * extra_per + single_per print "does this membership get a 10% discount? 1 = yes / 2 = no" discount_ans = input () if discount_ans is 1: membership_per = membership_per * discount print "Is there a start up fee? 1 = yes / 2 = no?" extra_fee_ans = input () if extra_fee_ans is 1: multi_fee = secondary * startup_extra + startup_1 multi_contract_fee = membership_per * months + multi_fee multi_contract = membership_per * months down_pay = membership_per + multi_fee bal = multi_contract_fee - down_pay print "Membership rate is %s per month" % (membership_per) print "plus a %s start up fee" % (multi_fee) print "Total Membership cost %s dollars with %s secondary member(s)" % (multi_contract_fee,secondary) print print #Contract fillout cheat sheet print "Contract Fill-out Cheat sheet" print print "Membership --------- %s" % (multi_contract) print "Tanning ------------ %s" % (tanning) print "Processing Fee ----- %s" % (multi_fee) print "Anytime Health ----- %s" % (anytime_health) print "Total -------------- %s" % (multi_contract_fee) print "Downpaymnt --------- %s" % (down_pay) print "Remaining Balance -- %s" % (bal) months_bal = months - 1 print "%s remainting payments" % (months_bal) print "at %s dollars per month" % (membership_per) if extra_fee_ans is 2: print "Family membership rate is %s per month" % (membership_per) multi_contract = membership_per * months down_pay = membership_per bal = multi_contract - down_pay print "Total membership cost %s dollars with %s secondary member(s)" % (multi_contract,secondary) print print #Contract fillout cheat sheet print "Contract Fill-out Cheat sheet" print print "Membership --------- %s" % (membership_per) print "Tanning ------------ %s" % (tanning) print "Processing Fee ----- %s" % (no_fee) print "Anytime Health ----- %s" % (anytime_health) print "Total -------------- %s" % (multi_contract) print "Downpaymnt --------- %s" % (down_pay) print "Remaining Balance -- %s" % (bal) months_bal = months -1 print "%s remainting payments" % (months_bal) print "at %s dollars per month" % (membership_per) raw_input ("press Enter to close window") sorry about posting all the code! Link to comment Share on other sites More sharing options...
Blue88Comanche Posted January 13, 2013 Author Share Posted January 13, 2013 thanks Alexia, that is much better Link to comment Share on other sites More sharing options...
Alexia Posted January 13, 2013 Share Posted January 13, 2013 .... it removed all the tap formating!! Should had wrapped the code tags around it! <?php Tabs rule! ?> Link to comment Share on other sites More sharing options...
Biotex Posted January 13, 2013 Share Posted January 13, 2013 I retired as a software engineer a few years ago. We were asked to learn a new language about every couple of months or so. They would send you to a 3 day class, and when you came out you were expected to code like it was your only purpose in life. I was on a project team that dealt with millions of lines of code for a very large company, and after learning about 10 different languages, I decided my brain was as full as it was ever going to get, so I retired at 50. I'm sooo happy to be able to play with Jeeps! BTW, never heard of Python until now. The last one I remember learning was C# (C-sharp). Link to comment Share on other sites More sharing options...
Blue88Comanche Posted January 13, 2013 Author Share Posted January 13, 2013 Should had wrapped the code tags around it! <?php Tabs rule! ?> i overlooked the "code" button lol, thanks for reminding me! I retired as a software engineer a few years ago. We were asked to learn a new language about every couple of months or so. They would send you to a 3 day class, and when you came out you were expected to code like it was your only purpose in life. I was on a project team that dealt with millions of lines of code for a very large company, and after learning about 10 different languages, I decided my brain was as full as it was ever going to get, so I retired at 50. I'm sooo happy to be able to play with Jeeps! BTW, never heard of Python until now. The last one I remember learning was C# (C-sharp). Python is best described at their web page www.python.org I chose python because it was free and easy to learn... that and my cousin knows python and helps me out with it. Link to comment Share on other sites More sharing options...
jimoshel Posted January 13, 2013 Share Posted January 13, 2013 Try learning Russian, Chinese or Urdo. It's easier. Link to comment Share on other sites More sharing options...
Blue88Comanche Posted January 13, 2013 Author Share Posted January 13, 2013 I would actually like to learn Russian, Link to comment Share on other sites More sharing options...
Geonovast Posted January 13, 2013 Share Posted January 13, 2013 I took a C course about a year ago, and thought it was quite enjoyable. I never got too far into it, just did some basic win32 console programs that didn't do much, other than a little battleship type game. Once I get settled in a job that's actually using my degree, I'd like to take some more advanced classes. Link to comment Share on other sites More sharing options...
mvusse Posted January 13, 2013 Share Posted January 13, 2013 I chose python because it was free and easy to learn... that and my cousin knows python and helps me out with it. Very popular in the Unix world. Or at least the Linux part of it. Link to comment Share on other sites More sharing options...
Blue88Comanche Posted January 13, 2013 Author Share Posted January 13, 2013 Very popular in the Unix world. Or at least the Linux part of it. That was another reason I chose python, my servers are running Linux and my raspberry Pi also runs a version of Linux Link to comment Share on other sites More sharing options...
gogmorgo Posted January 14, 2013 Share Posted January 14, 2013 I took a course in C++ my first year at UOIT, got a B in the class. I'll have to retake the course now that I've transferred here because they teach a different language, not sure which. Try learning Russian, Chinese or Urdo. It's easier. I took a Russian course last year as a bucket list thing. Not too bad, once you wrap your head around the cases and the wonky alphabet. Did reasonably well. Mind you, it's structurally pretty similar to other Indo-European languages, and I'm fluent in two (english and french) and moderately able in Spanish. Urdu is also IE. Chinese (or well, Mandarin... no such language as "Chinese") uses intonation and a retarded pictographic alphabet, but it's a pretty simple structure, and therefore I imagine it not being all that difficult. For a real challenge, try the Native American languages, or one in the Uralic family (like Finnish or Hungarian). Link to comment Share on other sites More sharing options...
HOrnbrod Posted January 14, 2013 Share Posted January 14, 2013 When I was posted throughout various countries throughout the South Pacific and Asia, I found it quite easy to speak the local languages within a year. All I did was frequent the local bars as much as I could, drink plenty of the local brew, and pretty soon I was speaking excellent bar room versions of Tagalog, Chamorro, and Marshallese. Korean and Japanese took a whole lot longer though and tons more beer. I don't know why............... Link to comment Share on other sites More sharing options...
Blue88Comanche Posted January 14, 2013 Author Share Posted January 14, 2013 When I was posted throughout various countries throughout the South Pacific and Asia, I found it quite easy to speak the local languages within a year. All I did was frequent the local bars as much as I could, drink plenty of the local brew, and pretty soon I was speaking excellent bar room versions of Tagalog, Chamorro, and Marshallese. Korean and Japanese took a whole lot longer though and tons more beer. I don't know why............... That's because the more beer everyone downed the more fluent in drunkinese everyone becomes, once you sober up you lose it. Link to comment Share on other sites More sharing options...
jimoshel Posted January 14, 2013 Share Posted January 14, 2013 Was in a bar in San Sebastion entertaining a young Senorita one night. She asked me how us Americans get what we want when we can't speak the language. Simple I replied. We just walk in a bar waving a 100 Peseta note with one hold and holding our (bleep) with the other. Link to comment Share on other sites More sharing options...
jimoshel Posted January 14, 2013 Share Posted January 14, 2013 I would actually like to learn Russian, Address? Image Not Found Link to comment Share on other sites More sharing options...
jimoshel Posted January 14, 2013 Share Posted January 14, 2013 That's because the more beer everyone downed the more fluent in drunkinese everyone becomes, once you sober up you lose it. Now that is one big 10-4 Link to comment Share on other sites More sharing options...
HOrnbrod Posted January 14, 2013 Share Posted January 14, 2013 That's because the more beer everyone downed the more fluent in drunkinese everyone becomes, once you sober up you lose it. This is true. But amazingly enough it comes right back the next night. Was in a bar in San Sebastion entertaining a young Senorita one night. She asked me how us Americans get what we want when we can't speak the language. Simple I replied. We just walk in a bar waving a 100 Peseta note with one hold and holding our (bleep) with the other. I used a more subtle variation of this because I was more cultured than you and didn't want to scare anyone. I'd tape a note of the local currency worth maybe 5-10 USD on my forehead, walk in the bar, and and scream in the local dialect "Hi ladies! See anything about me you like?". :yes: Worked every time. Link to comment Share on other sites More sharing options...
Blue88Comanche Posted January 14, 2013 Author Share Posted January 14, 2013 so its a good thing i posted the code for my program here, cause i broke the version i was working on. I started using TortoiseSVN to manage the older versions Link to comment Share on other sites More sharing options...
jimoshel Posted January 14, 2013 Share Posted January 14, 2013 Always preferred the direct approach. No misunderstandings that way. "Cultered", Isn't that what they make buttermilk and mold out of? Link to comment Share on other sites More sharing options...
Alexia Posted January 14, 2013 Share Posted January 14, 2013 so its a good thing i posted the code for my program here, cause i broke the version i was working on. I started using TortoiseSVN to manage the older versions Git(Such as github.com) or Mercurial(bitbucket.com) for repistory control. Subversion just is not up to par anymore. We code in C#, Objective-C, PHP, and Python at work. Link to comment Share on other sites More sharing options...
Blue88Comanche Posted January 14, 2013 Author Share Posted January 14, 2013 Git(Such as github.com) or Mercurial(bitbucket.com) for repistory control. Subversion just is not up to par anymore. We code in C#, Objective-C, PHP, and Python at work. I will look into those, currently I am using tortoiseSVN's local repository feature, Have you used Visual FoxPro 9 Professional? My uncle is a programmer and gave me use his extra copy. After I learn more python I was going to start on FoxPro, or maybe Russian lol Link to comment Share on other sites More sharing options...
Alexia Posted January 14, 2013 Share Posted January 14, 2013 I will look into those, currently I am using tortoiseSVN's local repository feature, Have you used Visual FoxPro 9 Professional? My uncle is a programmer and gave me use his extra copy. After I learn more python I was going to start on FoxPro, or maybe Russian lol Nope, I code everything using a simple text editor(TextMate) for OS X. Link to comment Share on other sites More sharing options...
gogmorgo Posted January 14, 2013 Share Posted January 14, 2013 Don't like OSX's built-in text editor? Just curious. Link to comment Share on other sites More sharing options...
Blue88Comanche Posted January 15, 2013 Author Share Posted January 15, 2013 Don't like OSX's built-in text editor? Just curious. I don't use a mac so i can't really speak for its text editor, but... with windows while i can use the built in notepad to make and edit python programs or scripts, its just a text editor.. where as Notepad++ shows the line number and will automatically color code conditions or comments and what not. Notepad++ also support tabs like "firefox" so yoy can have several files open and only use the one window. Link to comment Share on other sites More sharing options...
Alexia Posted January 15, 2013 Share Posted January 15, 2013 Don't like OSX's built-in text editor? Just curious. TextEdit is for simple text editing. TextMate and similar supports code highlighting, symbols, and a bunch of other code related features. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now