Waiting for answer This question has not been answered yet. You can hire a professional tutor to get the answer.

QUESTION

15 110 Project 1 ( Straight - line Programs ) Swami Iyer Problem 6 . ( Snell's Law ) Snell's law states that the ratio of the sines of the angles of...

Please I need help with this project in python 3 language. Thank you

15 110Project 1 ( Straight - line Programs )Swami IyerProblem 6 . ( Snell's Law ) Snell's law states that the ratio of the sines of the angles of incidence and refraction is equivalentto the reciprocal of the ratio of the indices of refraction , ie ,sin ( $ 1 ) _`sin ( @ 2 )21Write a program snell . py that takes three floats Q1 ( in degrees ) , 21 , and ~z as command - line arguments and writes thecorresponding angle of refraction Oz in degrees .$ python3 snell . py 58 1 1 . 5233 . 9125 139 982589 94Problem 7 . ( Gambler's Ruin ) Consider a coin- flipping game with two players where player one wins each toss with prob -ability p , and player two wins with probability q = 1 - p. Suppose player one has ~1 pennies and player two ~z pennies .Assuming an unfair coin ( ie , * * 1 / 2) , the probabilities PI and P 2 that players one and two , respectively , will end pennilessare1 - ( 2 ) 2 2\PI = 1 _ ( R ) Ritz and P 2 = -1 - ( 8 ) 711 - ( 8 ) 71 + 2zWrite a program gambler . py that takes two integers ~, and ~z and a float p as command - line arguments and writes theprobabilities PI and P2, separated by a space .$ python3 gambler . py 10 100 0 . 51*0 . 6 6 6 18 837 3420 0654 0 . 3 3 381 1 62657 9 9349Problem 8 . ( Waiting Time ) If I is the waiting time between now and the next event , the probability that * is greater*than t is given by the exponential distribution*P ( * > t ) = e - Atwhere the rate parameter I is the average number of events per unit of time . Write a program waiting _ time . py that takes twofloats I and & as command - line arguments and writes the probability P ( > > t ) .$ python3 waiting _ time . Py 0 . 1 50 . 606530 6597 1263.34\Problem 9 . ( Die Roll ) Write a program die _ roll . py that takes an integer ~ representing the number of sides of a fair die ,rolls an ( ~- sided) die twice , and writes the sum of the numbers rolled .$ python3 die _ roll . Py 6121 2 3\Problem 10 . ( Three Sort ) Write a program three _ sort . py that takes three integers as command - line arguments and writes$ python3 three _ sort . py 3 1 2them in ascending order , separated by spaces . Your solution must only use functions min ( ) and max ( ) .
Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question