-1

I'm trying to get the long run probabilities that Theme Parks, Cruise, Hiking, and City Visits happen but for some reason it wont print out a probability that each will happen. Only a probability for 1. All 4 are suppose to add up to 1.

Any help?

here is my code.

Rumit Patel
  • 8,830
  • 18
  • 51
  • 70

1 Answers1

0

The reason is the break statement in your code - it will abort the for loop after one iteration. Remove that and see how it goes.

Tim Pietzcker
  • 328,213
  • 58
  • 503
  • 561