Greetings Danielle,

Welcome to programming! Thanks for the additional clarification as to what
your project is. Starting from scratch isn't easy, but with a little bit of
guidance, you'll soon be able to "drive on your own!"

In the course you're taking, can you share a bit about what resources your
instructor has provided you? Is there a book or an online website that
you're using? From looking at the code you've created, it seems that you're
trying to just take the requirements and hoping that it matches with the
languages syntax. Because it does *not*, the Python interpreter cannot
figure out what you're trying to do.

The solution is to learn the language that the Python interpreter is
"speaking," and converse in that language to help you meet your goal. For
example, the book or website that you're using should be indicating that
when the requirement is: "Set operand1 = 2 and operand2 = 7," this does not
mean that 'set "(operand1 = 2 and operand2 = 7)"' is what you would do in
Python.

The reading should have told you that "set" is not a keyword in Python.
Instead, you would think, "I need to set these variables... how do I do
that?" In your study guide, you would then find something like: "In order
to assign a value to a variable in Python, for example, to assign the
integer 10 to the variable 'x', the correct syntax is: x = 10". You then
bring that back to your example and do something similar: "operand1 = 2".

In fact, all of us here on the mailing list would go a step further and ask
you to experiment, like set the variable and then display it, and to
cut-n-paste the output here so we can confirm you know how to do it, and
that it works:

>>> operand1 = 2
>>> print(operand1)
2
>>> print(1 + operand1)
3

Once you've gained some confidence, you can then do the same for operand2,
and after this, go back to your learning resource and learn how to add,
subtract, etc. The best part is that you only have to learn these steps
once. The rules don't change for this aspect of programming in Python, and
you can then go ahead and complete your assignment. The most important
thing is to reference your learning resource and not to guess based on the
requirements in the assignment. Check out all the examples and model your
solution after them.

Best of luck!
--Wesley


On Mon, Jul 14, 2014 at 10:51 PM, Danielle Salaz <daniesh...@gmail.com>
wrote:

> This is the assignment:
>
> Write a Python script as follows:
>
>
>
> Use 3 variables named:
>
>    operand1
>
>    operand2
>
>    result
>
> Set operand1 = 2 and operand2 = 7.
>
>
>
> Evaluate the following expressions and produce the output as shown:
>
>    result = operand1 + operand2
>
>    result = operand2 – operand1
>
>    result = operand2 * operand1
>
>    result = operand2 / operand1
>
>    result = operand2 % operand1
>
>
>
> Your output should look like:
>
>
>
>    operand1 = 2
>
>    operand2 = 7
>
>    2 + 7 = 9
>
>    7 – 2 = 5
>
>    7 * 2 = 14
>
>     etc.
>
>
> I am using Python 3.4 and my OS is Windows 7 Ultimate.
> Thank you everyone for all of your help
>
>
> On Sun, Jul 13, 2014 at 10:41 AM, Danny Yoo <d...@hashcollision.org>
> wrote:
>
>> On Sun, Jul 13, 2014 at 12:25 AM, Danielle Salaz <daniesh...@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?
>>
>
>
>
> --
> Thank you,
> Danielle Salaz
> Signature Financial Services, Inc.
> 21 W. Laurel Dr. #47, Salinas, Ca. 93906
> (831) 754-0600
>
> Your perception has everything to do with your progression!!
>
> _______________________________________________
> Tutor maillist  -  Tutor@python.org
> To unsubscribe or change subscription options:
> https://mail.python.org/mailman/listinfo/tutor
>
>


-- 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"A computer never does what you want... only what you tell it."
    +wesley chun <http://google.com/+WesleyChun> : wescpy at gmail : @wescpy
<http://twitter.com/wescpy>
    Python training & consulting : http://CyberwebConsulting.com
    "Core Python" books : http://CorePython.com
    Python blog: http://wescpy.blogspot.com
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to