本文介绍了为这两个问题创建代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

1. 二项式系数

假设您的UCID是"abc123",请创建一个以您的UCID"abc123"命名的新文件夹.
将计算概率的函数文件放在"abc123"中
还要在"abc123"中创建另一个文件夹"private",并将两个计算二项式系数和n的函数文件放入!在私人"中
将包含所有内容的"abc123"压缩为zip或tar文件,即abc123.zip或abc123.tar
注意,不正确的文件夹名称或压缩文件格式将导致零



2.
教科书P.419上的练习8.15

将弧度转换为度,分,秒
角度通常以度,分钟和秒为单位,以360度为圈,以60分钟为度,以分钟为60秒来度量.编写一个程序,该程序从输入磁盘文件中读取以弧度为单位的角度并将其转换为度,分和秒.输出应写入另一个文件.输入文件示例可以是:
#这是一条注释#您的程序应该能够跳过注释行#和空白行#输入的弧度数可以用空格0.0 1.0#或换行符3.141593 6.0
分隔此样本输入也可以从课程网页下载,并用作您的测试输入文件.向用户询问输入和输出文件名.相应地设计您的输出文件.

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.

推荐答案




这篇关于为这两个问题创建代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-13 17:51