1.
Binomial Coefficients
Suppose your UCID is “abc123” Create a new folder named by your UCID “abc123”
Put the function file that computes the probability in “abc123”
Also create another folder “private” in “abc123” and put the two functions files that compute binomial coefficient and n! in “private”
Compress “abc123” with everything in it into a zip or tar file, i.e., abc123.zip or abc123.tar
Note, incorrect folder names or compressed file formats will result in a zero
2.
Modified Exercises 8.15 on P.419 of textbook
Converting Radians to Degrees, Minutes, Seconds
Angles are often measured in degrees, minutes, and seconds, with 360 degrees in a circle, 60 minutes in a degree, and 60 seconds in a minute. Write a program that reads angles in radians from an input disk file and converts them into degrees, minutes, and seconds. Output should be written into another file. A sample input file could be:
# this is a comment # your program should be able to skip comment lines # and blank lines # input radian numbers could be seperated by blanks 0.0 1.0 # or by a newline 3.141593 6.0
This sample input can also be downloaded from the course webpage and used as your test input file. Ask the user for the input and output file names. Design your output file accordingly.