PythonLab @MLK in the Digital Commons.
Introduction to Python (2.7) from 2-4PM
Please bring laptops if you have them, check the hackpad for text editor and text details!
DC Python Hackpad
Join or login to comment.
Here is what we did today!
0 · August 16, 2014
Regarding our change calculator, it occurred to me that by the time we get down to pennies, what we have left is our answer for pennies. We don't have to call process_change for pennies.
I realize that adding in code to test for "coin == 1" is probably adding more code than just keeping it the way it is, but if there was a way....
I did make this change, but it’s no more efficient:
for coin in changelist: print "coin is:", coin if coin == 1: res = str(amount_chg) + '' + str(coin) else: res = process_change(amount_chg, coin) amount_chg = res print "new amount_chg:", amount_chg coinlist.append(res) return coinlist
0 · August 17, 2014
for coin in [25,10,5]:[…]res = proc_change(amt_chg, coin)[…]amt_chg = res[…]coinlist.append(res)# after “for” amt_chg has to be penniescoinlist.append(str(amt_chg)+''+str(1))return coinlist
[…] ==> indent
You are very right Chad! You should totally send a pull request! https://help.github.co...
How do I post a job?
0 · August 12, 2014
We educate, promote and support the research, development and use of open source Python software in Washington, D.C. and metropolitan Maryland and Virginia.
Bronze Level Donor
Individual Level Donor
Meetup has allowed me to meet people I wouldn't have met naturally - they're totally different than me.
— Allison, started Women's Adventure Travel
Meetup members, Log in