擅长:python、mysql、java
<p>从<a href="https://docs.python.org/2/library/datetime.html" rel="nofollow">Docs:</a></p>
<p>在你的队伍里:</p>
<pre><code>speed = int(distance) % time
</code></pre>
<p>您正试图对<code>int</code>和<code>datetime</code>对象使用模运算符,这是使用<code>.now()</code>方法得到的。在</p>
<p>如果要将时间转换为秒,则应使用<code>total_seconds()</code>方法进行转换。在</p>
<p>即</p>
^{pr2}$
<p>这将返回一个可以在除法中使用的整数,或者当前的模</p>