这是一个创建于 3985 天前的主题,其中的信息可能已经有所发展或是发生改变。
求助Python大大,教教小的,怎么修改,是Conditionals & Control Flow这一章的第15个习题
题目是这样的:
Write an if statement in the_flying_circus(). It must include:
and, or, or not;
==, !=, <, <=, >, or >=;
an if, elif, AND else statement;
it must return True when evaluated.
我的代码是这样的:
def the_flying_circus():
# Start coding here!
if 1 > 5:
return False
elif True and False != True:
return True
else:
return False
print the_flying_circus()
print the_flying_circus()
print the_flying_circus()
9 条回复 • 1970-01-01 08:00:00 +08:00
|
|
1
nodejx 2013-11-08 11:43:21 +08:00
def the_flying_circus(): # Start coding here! if 1>0: return (True or False and (not False)) elif False: return True else: return True the_flying_circus()
随手一些,貌似通过了。。。
|
|
|
2
acpp 2013-11-08 12:03:43 +08:00
|
|
|
3
nodejx 2013-11-08 12:33:19 +08:00
|
|
|
4
kennedy32 2013-11-08 13:13:57 +08:00 via Android
我记得这个自带论坛的
|
|
|
6
nodejx 2013-11-08 14:10:14 +08:00
|
|
|
7
ChiangDi 2013-11-08 20:07:34 +08:00 via Android
|
|
|
8
acpp 2013-11-08 20:25:34 +08:00
@ ChiangDi 你也去那个网站找下,看看哪个是大图
|
|
|
9
ChiangDi 2013-11-08 21:44:06 +08:00
@ acpp 注册不了,貌似是个很高端的组织,不让进
|