练习 24 更多练习

    ex24.py

    1. Let's practice everything.
    2. You'd need to know 'bout escapes with \ that do:
    3. --------------
    4. with logic so firmly planted cannot discern
    5. the needs of love
    6. nor comprehend passion from intuition
    7. and requires an explanation
    8. where there is none.
    9. This should be five: 5
    10. With a starting point of: 10000
    11. We'd have 5000000 beans, 5000.0 jars, and 50.0 crates.
    12. We can also do that this way:
    13. We'd have 500000.0 beans, 500.0 jars, and 5.0 crates.
    • 有意打乱这个文件,然后运行,看看你会收到什么样的错误信息,确保你能把它修复好。

    为什么你给变量叫 jelly_beans 但是后面又用的是 这个名字? 这是函数如何运行的一部分。记住,在函数内部变量是暂时的。当你返回它的时候,它可以被分配给一个变量以便之后使用。我只是创建了一个新的变量 beans 来保存返回的值。

    这首诗是谁写的?是我,其实我写的不全是烂诗。