Question: Problem 1 . ( Reverse ) Write a program called reverse py that accepts strings from standard input, and writes them in reverse order to

Problem 1.(Reverse) Write a program called reverse py that accepts strings from standard input, and writes them in reverse order to standard output.Problem 2.(Euclidean Distance) Write a program called distance.py that accepts n (int) as command-line argument, two n-dimensional lists x and y of floats from standard input, and writes to standard output the Euclidean distance between two vectors represented by x and y. The Euclidean distance is calculated as the square root of the sums of the squares of the differences between the corresponding entries.Problem 3.(Birthday Problem) Suppose that people enter an empty room until a pair of people share a birthday. On average, how many people will have to enter before there is a match? Write a program called birthday.py that accepts trials (int) as command-line argument, runs trials experiments to estimate this quantity - each experiment involves sampling individuals until a pair of them share a birthday, and writes the value to standard output.
Problem 1 . ( Reverse ) Write a program called

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!