[Tutor] Help on Python

Joel Goldstick joel.goldstick at gmail.com
Tue Oct 15 06:49:02 EDT 2019


On Tue, Oct 15, 2019 at 6:38 AM Richard Damon <Richard at damon-family.org> wrote:
>
> On 10/14/19 8:07 PM, Tyson Barber wrote:
> > Hello Tutor,
> >
> > I am new to Python and had a question.
> >
> > incomevar = (input("Please enter the income: ")
> >             income = int(incomevar)
> > costvar = int(input("Please enter the cost: ")
> >             cost = int(costvar)
> >                 if income >= cost :
> >                   print (income - cost == profit)
> >               else income < cost :
> >                   print (cost - income == loss)
> >
> > I have tried many things for this to work, including changing the variable
> > names, spacing issues. Nothing seems to work and I am quite confused. I
> > honestly don't even know if this is the right email address to send this to.
> >
> > Thank you,
> > Tyson Barber

You haven't asked a question.  The first thing I remember when trying
to learn python is the requirement of proper indentation.  Python
doesn't use braces like C and other languages.  Your spacing is wrong.
You should run your program, then cut and paste the traceback in your
message to this list. It provides information as to what is wrong.


More information about the Tutor mailing list