Get the input from the user. Write a program that will handle getting the EXACTA bet, and the EXACTABOX bet as input from the user. Cheat, and by this I mean, show the results of the race to the user before they make their bets, that way they can cheat and win if they want. Keep track of your money as USD and assume you start out with 200 dollars. Put your logic into a loop so you can keep placing bets and running races and see your balance as you go.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Python - question down below

This is my code for a horse racing betting game

Code :

import random
def Readysetgo(horses):
shuffled = random.sample(horses,len(horses))
return shuffled

horses = [1,2,3,4]
ch=1
balance = 200
while(ch!=0):
print("Please select from the following options 1-6")
print("1. Place an exact bet")
print("2. Place an exactabox bet")
print("3. Place a trifectabet")
print("4. Please a trifectabox bet")
print("5. See your USD balance")
print("6. Exit")
ch = int(input())
if ch==1:
balance -= 10
shuffled = Readysetgo(horses)
print("Guess the exact winning order of the top two horses.")
x,y = input().split()
x = int(x)
y = int(y)
if x==shuffled[0] and y==shuffled[1]:
balance += 100
elif ch==2:
balance -= 5
shuffled = Readysetgo(horses)
print("Guess the top two horses in any order.")
x,y = input().split()
x = int(x)
y = int(y)
if (x==shuffled[0] and y==shuffled[1]) or (x==shuffled[1] and y==shuffled[0]):
balance += 50
elif ch==3:
balance -= 25
shuffled = Readysetgo(horses)
print("Guess the exact winning order of the top three horses.")
x,y,z = input().split()
x = int(x)
y = int(y)
z = int(z)
if (x==shuffled[0] and y==shuffled[1] and z==shuffled[2]):
balance += 200
elif ch==4:
balance -= 20
shuffled = Readysetgo(horses)
print("Guess the top three horses in any order.")
x = list(map(int,input().split()))
if (shuffled.sort()==x.sort()):
balance += 150
elif ch==5:
print("Your USD Balance is ",balance," USD.")
elif ch==6:
ch=0
else:
print("Invalid choice.. Please enter again")
print("Thanks for Playing...!")

 

Question: Need help to modify

Get the input from the user. Write a program that will handle getting the EXACTA bet, and the EXACTABOX bet as input from the user. Cheat, and by this I mean, show the results of the race to the user before they make their bets, that way they can cheat and win if they want. Keep track of your money as USD and assume you start out with 200 dollars. Put your logic into a loop so you can keep placing bets and running races and see your balance as you go.

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 4 images

Blurred answer
Knowledge Booster
Problems on Dynamic Programming
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-engineering and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY