Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

a) use the loop : play the game 10000,100000,1000000times seperately. calculate the expected payoff, record excecution time of each round b) use veterization programming: play

image text in transcribed
a) use the loop : play the game 10000,100000,1000000times seperately. calculate the expected payoff, record excecution time of each round
b) use veterization programming: play the game 10000,100000,1000000times seperately. calculate the expected payoff, record running time eaxh time.
please show a) and b)
the pay off condition is
if :
num>= 4
payoff = 2
else:
payoff= -1
import random total payoff = 0 for l in range (0, 100000): dice_num= random.randint(1,6) if dice_num>=4 Dayoff-2 else: payoffs-1 expected payoff = total payoff / number of rounds print "expected payoff=", expected_payoff) I File "cipython-input-22 28360466c1ff>", line 12 expected payoff = total payoff / number of rounds SyntaxError: invalid syntax import random total payoff = 0 for l in range (0, 100000): dice_num= random.randint(1,6) if dice_num>=4 Dayoff-2 else: payoffs-1 expected payoff = total payoff / number of rounds print "expected payoff=", expected_payoff) I File "cipython-input-22 28360466c1ff>", line 12 expected payoff = total payoff / number of rounds SyntaxError: invalid syntax

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advances In Spatial And Temporal Databases 10th International Symposium Sstd 2007 Boston Ma Usa July 2007 Proceedings Lncs 4605

Authors: Dimitris Papadias ,Donghui Zhang ,George Kollios

2007th Edition

3540735399, 978-3540735397

More Books

Students also viewed these Databases questions

Question

Prepare an employment application.

Answered: 1 week ago

Question

=+working on a micro-multinational?

Answered: 1 week ago

Question

=+j Identify the challenges of training an international workforce.

Answered: 1 week ago