Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #65354

Re: Calculator Problem

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 <joel.goldstick@gmail.com>
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&gt;': 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; '&gt;': 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> <mailman.6310.1391377595.18130.python-list@python.org> <61630cc4-a9fe-4936-a86e-65c891224a63@googlegroups.com>
Date Mon, 3 Feb 2014 13:17:44 -0500
Subject Re: Calculator Problem
From Joel Goldstick <joel.goldstick@gmail.com>
To Charlie Winn <charliewinn97@gmail.com>
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 <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.6350.1391451473.18130.python-list@python.org> (permalink)
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

Show key headers only | View raw


[Multipart message — attachments visible in raw view] - view raw

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 '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

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Calculator Problem Charlie Winn <charliewinn97@gmail.com> - 2014-02-02 13:16 -0800
  Re: Calculator Problem Alister <alister.ware@ntlworld.com> - 2014-02-02 21:39 +0000
  Re: Calculator Problem Gary Herron <gary.herron@islandtraining.com> - 2014-02-02 13:46 -0800
    Re: Calculator Problem Denis McMahon <denismfmcmahon@gmail.com> - 2014-02-02 22:11 +0000
    Re: Calculator Problem Charlie Winn <charliewinn97@gmail.com> - 2014-02-03 10:04 -0800
      Re: Calculator Problem Joel Goldstick <joel.goldstick@gmail.com> - 2014-02-03 13:17 -0500
        Re: Calculator Problem Charlie Winn <charliewinn97@gmail.com> - 2014-02-03 10:25 -0800
          Re: Calculator Problem Denis McMahon <denismfmcmahon@gmail.com> - 2014-02-04 00:41 +0000
      Re: Calculator Problem Roy Smith <roy@panix.com> - 2014-02-03 13:26 -0500
      Re: Calculator Problem Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-02-03 22:24 +0000
        Re: Calculator Problem Ian Kelly <ian.g.kelly@gmail.com> - 2014-02-03 16:10 -0700
      Re: Calculator Problem Gary Herron <gary.herron@islandtraining.com> - 2014-02-03 15:06 -0800
  Re: Calculator Problem David Hutto <dwightdhutto@gmail.com> - 2014-02-04 07:43 -0800
    Re: Calculator Problem David Hutto <dwightdhutto@gmail.com> - 2014-02-04 10:54 -0500
    Re: Calculator Problem Roy Smith <roy@panix.com> - 2014-02-04 19:53 -0500
      Re: Calculator Problem Chris Angelico <rosuav@gmail.com> - 2014-02-05 12:09 +1100
      Re: Calculator Problem Dan Sommers <dan@tombstonezero.net> - 2014-02-05 02:22 +0000
        Re: Calculator Problem Joshua Landau <joshua@landau.ws> - 2014-02-05 18:03 +0000
        Re: Calculator Problem Peter Otten <__peter__@web.de> - 2014-02-05 19:15 +0100
  Re: Calculator Problem "Mario R. Osorio" <nimbiotics@gmail.com> - 2014-02-04 14:55 -0800
  Re: Calculator Problem 88888 Dihedral <dihedral88888@gmail.com> - 2014-02-05 10:30 -0800

csiph-web