| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 726 人关注过本帖
标题:求两个程序解答
只看楼主 加入收藏
feifei122
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2010-9-24
结帖率:0
收藏
已结贴  问题点数:0 回复次数:1 
求两个程序解答
Q1: De ne a function named max that takes three integers as its arguments and returns the largest
integer among the three. Note that you can't use any Python library functions in your function def-
inition. Provide your function de nition in a .py  le named Q1.py. Do not include any top-level
testing code in your Q1.py.
Q2: We have implemented Euclidean algorithm to  nd the greatest common divisor of two non-negative
integers. We also discussed some other algorithms to  nd the greatest common divisor in Week 1.
Now implement one of such algorithms (any one you like) to  nd the greatest common divisor of
two non-negative integers, but NOT Euclidean algorithm.
Note:
1) Your algorithm has to be implemented in a function and the function should be named gcd
2) Provide your function de nition in a .py  le named Q2.py
3) Do not include any top-level testing code in your Q2.py
搜索更多相关主题的帖子: 解答 
2010-10-20 00:40
yangfanconan
Rank: 7Rank: 7Rank: 7
等 级:贵宾
威 望:10
帖 子:397
专家分:541
注 册:2009-9-22
收藏
得分:20 

全英文的?
2010-10-20 14:05
快速回复:求两个程序解答
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.014798 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved