Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: You can use the sum function to get the sum of all numbers in a vector) (e) Not only is this game a nice way to kill time, it would also be a very interesting question in a probability course! Unfortunately, this is not a probability course. However, we can run this game a lot of times and try to approximate the probability of each of the three possibilities – Player 1 wins, Player 2 wins and Draw. Modify the code above to run this game for n times, where n should be a variable in your code, and the...
View Full Document

This test prep was uploaded on 03/02/2014 for the course CS 100 taught by Professor Sohaibkhan,arifzaman,murtazataj during the Spring '11 term at Lahore University of Management Sciences.

Ask a homework question - tutors are online