The Artima Developer Community
Sponsored Link

Python Answers Forum
Need someone to help me write a program

1 reply on 1 page. Most recent reply: Jul 1, 2004 12:42 PM by John Avery

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
John Avery

Posts: 6
Nickname: kingdud
Registered: Jul, 2004

Need someone to help me write a program Posted: Jul 1, 2004 12:40 PM
Reply to this message Reply
Advertisement
<p>Hello, I am new to programming and Python. I am trying to write a program to let me see if there is a way to garentee my bets in a game. So far I have the input and some caclulation portions coded but I am getting stuck on the part where the program adds 1 to the "coin value" to keep on looking for that perfect combination of coins.<br><br>

I would love it if you had AIM or MSN messenger. It is an open source program (though I doubt anyone but me would want to use it) so I don't have any problems with showing you what I have already done. Here is what I have so far:<br><br>

#inputs number of coins to occupy each value slot<br>
coin1 = input("Number of coins in 72x slots: ")<br>
coin2 = input("Number of coins in 36x slots: ")<br>
coin3 = input("Number of coins in 21x slots: ")<br>
coin4 = input("Number of coins in 14x slots: ")<br>
coin5 = input("Number of coins in 10x slots: ")<br>
coin6 = input("Number of coins in 8x slots: ")
<br><br>
#modifies coin count so you don't have to account for the 2 slots for each value
c1 = coin1 * 2<br>
c2 = coin2 * 2<br>
c3 = coin3 * 2<br>
c4 = coin4 * 2<br>
c5 = coin5 * 2<br>
c6 = coin6 * 4
<br><br>
#adds all the coins used together<br>
sum = 2 + c1 + c2 + c3 + c4 + c5 + c6
<br><br>
#figures out how much money is spent<br>
money = sum * 100
<br><br>
#calculates the minimum ammont of money you will make on a bet<br>
min = coin6 * 800
<br><br>
While min <= money<br>
coin6 = coin6 + 1
<br><br>
My AIM SN is Kingdud5<br>
My MSN e-mail is Kingdud5@hotmail.com
<br><br>
Any help would be greatly appreciated.
<br><br>
Peace out,
<br><br>
-Kingdud</p>


John Avery

Posts: 6
Nickname: kingdud
Registered: Jul, 2004

Re: Need someone to help me write a program Posted: Jul 1, 2004 12:42 PM
Reply to this message Reply
wow...ok, note to self: On these forums, you don't need to put HTML in except to get the preview to show correctly.

Sorry for all the BR crap guys, I didn't know it would do that :/

Peace out,

-Kingdud

Flat View: This topic has 1 reply on 1 page
Topic: Scrolled Canvas problem!!! Previous Topic   Next Topic Topic: getting values from an

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use