擅长:python、mysql、java
<p>让我们看看你的例子(^.^)</p>
<pre><code>if math == division:
x = float(input('First number: '))
y = float(input('Second number: '))
def division(x,y):
div = x / y
print(div)
division(x / y) <-(pay attention to this line!)
</code></pre>
<p>创建名为<code>def division (x,y)</code>的函数时,说明此函数将接受两个变量。你知道吗</p>
<p>你继续说,这个函数将打印的商,当你把<strong>x</strong>除以<strong>y</strong>(<code>div = x/y</code>和<code>print(div)</code>)。你知道吗</p>
<p>当你想调用除法函数时,你必须给它传递两个变量,它可以执行你分配给它的任务。您不需要传递它,因为1)它需要两个变量2)函数将通过传递的两个变量来完成。你知道吗</p>