<p>我正在开发一个需要执行以下操作的程序:</p>
<blockquote>
<p>Write a script that asks a user for a number. The script adds 3 to that number. Then multiplies the result by 2, subtracts 4, subtracts twice the original number, adds 3, then prints the result.</p>
</blockquote>
<p>这是我的第一个解决方案:</p>
<pre><code>#Prompt user for number
number = input("Input a number")
#Print out the solution
print number + 3 * 2 - 4 - (number * 2) + 3
</code></pre>
<p>这是我的第二个解决方案:</p>
^{pr2}$
<p>哪个解决方案是正确的,还是两者都不正确?在</p>
<p>我知道这很基本,但我正在学习编程。我想我应该尝试两种不同的编写代码的方法。在</p>