📣 黑五价提前开抢|VIP一年通行证5折,蓝莓、Offer多多同步特惠
12
返回列表 发新帖
楼主: sky420
跳转到指定楼层
上一主题 下一主题
收起左侧

[CS61A]Lab0和Lab01

🔗
wuxiaomin98 2015-5-11 02:29:19 | 只看该作者
全局:
WXMs-MacBook-Pro:lab01 WXM$ python3 -m doctest -v lab01.py
Trying:
    my_email() != 'oski@berkeley.edu'
Expecting:
    True
ok
Trying:
    twenty_fifteen()
Expecting:
    2015
ok
1 items had no tests:
    lab01
2 items passed all tests:
   1 tests in lab01.my_email
   1 tests in lab01.twenty_fifteen
2 tests in 3 items.
2 passed and 0 failed.
Test passed.
回复

使用道具 举报

🔗
guangstick 2015-5-17 04:55:00 | 只看该作者
全局:
def my_email():
    """Return your email address as a string.

    >>> my_email() != 'oski@berkeley.edu'
    True
    """
    return 'shit@berkeley.edu'

from operator import add, mul

def twenty_fourteen():
    """Come up with the most creative expression that evaluates to 2014,
    using only numbers and the functions add(. . .) and mul(. . .).

    >>> twenty_fourteen()
    2014
    """
    return add(14,mul(20,100))
回复

使用道具 举报

🔗
Liaeve 2015-10-20 09:17:11 | 只看该作者
全局:
def my_email():
    """Return your last name as a string.

    >>> my_email() != 'oski@berkeley.edu'
    True
    """
    return 'lia@berkeley.edu'

def twenty_fifteen():
    """Come up with the most creative expression that evaluates to 2015,
    using only numbers and the functions add(. . .) and mul(. . .).

    >>> twenty_fifteen()
    2015
    """
    return 2015
回复

使用道具 举报

🔗
Chris1993 2015-10-21 14:40:44 | 只看该作者
全局:
def my_email():
    """Return your email address as a string.

    >>> my_email() != 'oski@berkeley.edu'
    True
    """
    return 'chris.y@berkeley.edu'

from operator import add, mul

def twenty_fifteen():
    """Come up with the most creative expression that evaluates to 2015,
    using only numbers and the functions add(. . .) and mul(. . .).

    >>> twenty_fifteen()
    2015
    """
    "*** YOUR CODE HERE ***"
    return 5*403
回复

使用道具 举报

🔗
rockleecsu 2015-12-3 11:48:50 | 只看该作者
全局:
求加分!!!


另外大家知道这种有autograder的公开课有哪些么?
不包括coursera, edx这种Mooc
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册账号
隐私提醒:
  • ☑ 禁止发布广告,拉群,贴个人联系方式:找人请去🔗同学同事飞友,拉群请去🔗拉群结伴,广告请去🔗跳蚤市场,和 🔗租房广告|找室友
  • ☑ 论坛内容在发帖 30 分钟内可以编辑,过后则不能删帖。为防止被骚扰甚至人肉,不要公开留微信等联系方式,如有需求请以论坛私信方式发送。
  • ☑ 干货版块可免费使用 🔗超级匿名:面经(美国面经、中国面经、数科面经、PM面经),抖包袱(美国、中国)和录取汇报、定位选校版
  • ☑ 查阅全站 🔗各种匿名方法

本版积分规则

>
快速回复 返回顶部 返回列表