[Tutor] how do I set variables in Python 3.4

Danny Yoo dyoo at hashcollision.org
Sun Jul 13 19:41:43 CEST 2014


On Sun, Jul 13, 2014 at 12:25 AM, Danielle Salaz <danieshari at gmail.com> wrote:
> This is what I've been doing, also I'm using version 3.4
>
> set "(operand1 = 2 and operand2 = 7)
> print (operand1 = 2)
> print (operand2 = 7)
> print (result=operand1 + operand2)
> print (result=operand2 - operand1)
> print (result=operand2 * operand1)
> print (result=operand2 / operand1)
> print (result=operand2 % operand1)


Beyond what Alan has said, also please also also say what you expected
to happen if the program were to run without error.

I mentioned this earlier in a prior reply in this thread, and I still
stick by the recommendation.  We want to help troubleshoot any
misconceptions as early as possible, and knowing intent is helpful.

Since you are a beginner, try to explain each line and the overall
program goal if possible.  It will help us understand what programming
model you've got in your head.  For example, can you explain what the
first three lines of your program are intended to do?


More information about the Tutor mailing list