Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.011 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'else:': 0.03; 'syntax': 0.04; 'elif': 0.05; '*not*': 0.07; 'result,': 0.07; 'cc:addr :python-list': 0.11; 'def': 0.12; 'accusations': 0.16; 'did,': 0.16; 'intended.': 0.16; 'screenshots': 0.16; 'skip:q 30': 0.16; 'subject:Problem': 0.16; 'utc,': 0.16; 'fix': 0.17; 'wrote:': 0.18; 'hey': 0.18; 'variable': 0.18; 'trying': 0.19; 'feb': 0.22; 'email addr:gmail.com>': 0.22; 'cc:addr:python.org': 0.22; 'print': 0.22; 'errors.': 0.24; 'sorry,': 0.24; 'guys': 0.24; 'question': 0.24; 'cc:2**0': 0.24; 'cc:no real name:2**0': 0.24; '>': 0.26; 'this:': 0.26; 'header:In-Reply-To:1': 0.27; 'errors': 0.30; 'message-id:@mail.gmail.com': 0.30; 'url:mailman': 0.30; 'program,': 0.31; 'lines': 0.31; '(since': 0.31; 'gary': 0.31; 'run': 0.32; 'url:python': 0.33; 'running': 0.33; "can't": 0.35; 'display': 0.35; 'one,': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'really': 0.36; '8bit%:9': 0.36; 'url:listinfo': 0.36; 'url:org': 0.36; 'should': 0.36; 'two': 0.37; 'skip:& 10': 0.38; 'fact': 0.38; 'pm,': 0.38; 'skip:p 20': 0.39; 'url:mail': 0.40; 'even': 0.60; 'skip:\xc2 10': 0.60; 'tell': 0.60; 'full': 0.61; 'first': 0.61; 'times': 0.62; 'name': 0.63; '8bit%:10': 0.64; 'to:addr:gmail.com': 0.65; 'here': 0.66; 'results': 0.69; 'cut': 0.74; 'claim.': 0.84; 'divide': 0.84; 'happened.': 0.84; 'is)': 0.84; 'nonsense.': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=9HMTnPzWYGnuqQ6RRAqWcOdThK5nl37wombAaCKNpKA=; b=K1jr1Pu3KcGLH526U2GowKuWK26njUVkk88qztogX/6S8Kzk3vBY9NvA9STYlU/1tx AXVEPcvWDI8IiisOT7cKj10V7NrGu/NrkLKp5zIiuE5XIR6kapq53EMmnv0tU3J03LDE 1mGImipre0ewBPd/fel/2UvEKR2+Qzk4GUOxJvmTeXMDKXDucOyNNYIYrkEE1/8JTeV1 QW5MPLXHzS5HDWclHSfy7+rP+ZAsqobVmpKwwuTjgmiLXOPYf/jWPoSlhPPutxp5pWQV oJ29NEHfsAZQ1BqHut3vrjy46Xu1N4xZ9Gyjdus7mWMB3upmpYlrAKSs6/WPj62n7LC2 /slA== MIME-Version: 1.0 X-Received: by 10.220.89.4 with SMTP id c4mr186727vcm.53.1391451464309; Mon, 03 Feb 2014 10:17:44 -0800 (PST) In-Reply-To: <61630cc4-a9fe-4936-a86e-65c891224a63@googlegroups.com> References: <608a3384-525b-4879-82d2-5a6414827fa7@googlegroups.com> <61630cc4-a9fe-4936-a86e-65c891224a63@googlegroups.com> Date: Mon, 3 Feb 2014 13:17:44 -0500 Subject: Re: Calculator Problem From: Joel Goldstick To: Charlie Winn Content-Type: multipart/alternative; boundary=047d7b3a845640a06f04f1848a72 Cc: python-list@python.org X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 344 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1391451473 news.xs4all.nl 2933 [2001:888:2000:d::a6]:53170 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:65354 --047d7b3a845640a06f04f1848a72 Content-Type: text/plain; charset=UTF-8 On Feb 3, 2014 1:05 PM, "Charlie Winn" wrote: > > On Sunday, February 2, 2014 9:46:24 PM UTC, Gary Herron wrote: > > On 02/02/2014 01:16 PM, Charlie Winn wrote: > > > > > Hey Guys i Need Help , When i run this program i get the 'None' Under the program, see what i mean by just running it , can someone help me fix this > > > > > > > > > > def Addition(): > > > > > print('Addition: What are two your numbers?') > > > > > 1 = float(input('First Number:')) You can't name a variable a number > > > > > 2 = float(input('Second Number:')) > > > > > print('Your Final Result is:', 1 + 2) You should a result, then print it after the function. > > > > > > > > > > > > > def Subtraction(): > > > > > print('Subtraction: What are two your numbers?') > > > > > 3 = float(input('First Number:')) > > > > > 4 = float(input('Second Number:')) > > > > > print('Your Final Result is:', 3 - 4) > > > > > > > > > > > > > > > def Multiplication(): > > > > > print('Multiplication: What are two your numbers?') > > > > > 5 = float(input('First Number:')) > > > > > 6 = float(input('Second Number:')) > > > > > print('Your Final Result is:', 5 * 6) > > > > > > > > > > > > > > > def Division(): > > > > > print('Division: What are your two numbers?') > > > > > 7 = float(input('First Number:')) > > > > > 8 = float(input('Second Number:')) > > > > > print('Your Final Result is:', 7 / 8) > > > > > > > > > > > > > > > > > > > > print('What type of calculation would you like to do?') > > > > > Question = input('(Add, Subtract, Divide or Multiply)') > > > > > if Question.lower().startswith('a'): > > > > > print(Addition()) > > > > > elif Question.lower().startswith('s'): > > > > > print(Subtraction()) > > > > > elif Question.lower().startswith('d'): > > > > > print(Division()) > > > > > elif Question.lower().startswith('m'): > > > > > print(Multiplication()) > > > > > else: > > > > > print('Please Enter The First Letter Of The Type Of Calculation You Would Like To Use') > > > > > > > > > > while Question == 'test': > > > > > Question() > > > > > > > > Sorry, but in fact you did *not* run this program as you claim. It's > > > > full of syntax errors. Any attempt to run it will display syntax errors > > > > immediately, and never actually run. So please tell us what really > > > > happened. > > > > > > > > But even without an accurate description of what you did, I can say this: > > > > > > > > Lines like > > > > 1 = float(...) > > > > don't make sense. It's as if you are trying to change the value of the > > > > number one, but that's nonsense. > > > > > > > > And lines like > > > > print('Your Final Result is:', 5 * 6) > > > > had better print out 30 (since that is what 5 times 6 is) but that's > > > > clearly not what you intended. > > > > > > > > Gary Herron > > excuse me but don't be so ******* rude , i did run this program and it did run correctly and if you want me to prove it with screenshots so be it , so don't make accusations ** Gary ** i only came here for some help not to be accused of not even running my program If you can run this, cut and paste the results > > Charlie :D > -- > https://mail.python.org/mailman/listinfo/python-list --047d7b3a845640a06f04f1848a72 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


On Feb 3, 2014 1:05 PM, "Charlie Winn" <charliewinn97@gmail.com> wrote:
>
> On Sunday, February 2, 2014 9:46:24 PM UTC, Gary Herron wrote:
> > On 02/02/2014 01:16 PM, Charlie Winn wrote:
> >
> > > Hey Guys i Need Help , When i run this program i get the = 9;None' Under the program, see what i mean by just running it , can som= eone help me fix this
> >
> > >
> >
> > > def Addition():
> >
> > > =C2=A0 =C2=A0 =C2=A0print('Addition: What are two your n= umbers?')
> >
> > > =C2=A0 =C2=A0 =C2=A01 =3D float(input('First Number:'= ;))

You can't name a variable a number
> >
> > > =C2=A0 =C2=A0 =C2=A02 =3D float(input('Second Number:= 9;))
> >
> > > =C2=A0 =C2=A0 =C2=A0print('Your Final Result is:', 1= + 2)

You should a result, then print it after the function.
> > >
> >
> > >
> >
> > > def Subtraction():
> >
> > > =C2=A0 =C2=A0 =C2=A0print('Subtraction: What are two you= r numbers?')
> >
> > > =C2=A0 =C2=A0 =C2=A03 =3D float(input('First Number:'= ;))
> >
> > > =C2=A0 =C2=A0 =C2=A04 =3D float(input('Second Number:= 9;))
> >
> > > =C2=A0 =C2=A0 =C2=A0print('Your Final Result is:', 3= - 4)
> >
> > >
> >
> > >
> >
> > > def Multiplication():
> >
> > > =C2=A0 =C2=A0 =C2=A0print('Multiplication: What are two = your numbers?')
> >
> > > =C2=A0 =C2=A0 =C2=A05 =3D float(input('First Number:'= ;))
> >
> > > =C2=A0 =C2=A0 =C2=A06 =3D float(input('Second Number:= 9;))
> >
> > > =C2=A0 =C2=A0 =C2=A0print('Your Final Result is:', 5= * 6)
> >
> > >
> >
> > >
> >
> > > def Division():
> >
> > > =C2=A0 =C2=A0 =C2=A0print('Division: What are your two n= umbers?')
> >
> > > =C2=A0 =C2=A0 =C2=A07 =3D float(input('First Number:'= ;))
> >
> > > =C2=A0 =C2=A0 =C2=A08 =3D float(input('Second Number:= 9;))
> >
> > > =C2=A0 =C2=A0 =C2=A0print('Your Final Result is:', 7= / 8)
> >
> > >
> >
> > >
> >
> > >
> >
> > > print('What type of calculation would you like to do?= 9;)
> >
> > > Question =3D input('(Add, Subtract, Divide or Multiply)&= #39;)
> >
> > > if Question.lower().startswith('a'):
> >
> > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0print(Additi= on())
> >
> > > elif Question.lower().startswith('s'):
> >
> > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0print(Subtra= ction())
> >
> > > elif Question.lower().startswith('d'):
> >
> > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0print(Divisi= on())
> >
> > > elif Question.lower().startswith('m'):
> >
> > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0print(Multip= lication())
> >
> > > else:
> >
> > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0print('Please Enter Th= e First Letter Of The Type Of Calculation You Would Like To Use')
> >
> > >
> >
> > > while Question =3D=3D 'test':
> >
> > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Question()
> >
> >
> >
> > Sorry, but in fact you did *not* run this program as you claim. I= t's
> >
> > full of syntax errors. =C2=A0Any attempt to run it will display s= yntax errors
> >
> > immediately, and never actually run. =C2=A0 So please tell us wha= t really
> >
> > happened.
> >
> >
> >
> > But even without an accurate description of what you did, I can s= ay this:
> >
> >
> >
> > Lines like
> >
> > =C2=A0 =C2=A0 =C2=A01 =3D float(...)
> >
> > don't make sense. =C2=A0It's as if you are trying to chan= ge the value of the
> >
> > number one, but that's nonsense.
> >
> >
> >
> > And lines like
> >
> > =C2=A0 =C2=A0 =C2=A0print('Your Final Result is:', 5 * 6)=
> >
> > had better print out 30 (since that is what 5 times 6 is) but tha= t's
> >
> > clearly not what you intended.
> >
> >
> >
> > Gary Herron
>
> excuse me but don't be so ******* rude , i did run this program an= d it did run correctly and if you want me to prove it with screenshots so b= e it , so don't make accusations ** Gary ** i only came here for some h= elp not to be accused of not even running my program

If you can run this, cut and paste the results
>
> Charlie :D
> --
> https= ://mail.python.org/mailman/listinfo/python-list

--047d7b3a845640a06f04f1848a72--