12/15/2023 0 Comments Math.random java between 1 and 100![]() Int prob = Math.floor(Math.random() * 3) The method should be written the following way: The problem is that Math.random is being called twice and the conditional probability of a lose is not 1/3. Write a method that returns "win", "lose", or "draw" each 1/3 of the time.Įlse if (Math.floor(Math.random() * 3 = 1)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |