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


Groups > comp.lang.python > #65433

Re: Calculator Problem

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!goblin2!goblin.stu.neva.ru!newsfeed.xs4all.nl!newsfeed1a.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <dwightdhutto@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.007
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'else:': 0.03; 'elif': 0.05; 'assign': 0.07; 'literal': 0.09; 'python': 0.11; 'def': 0.12; 'missed': 0.12; '2.7.3': 0.16; 'skip:q 30': 0.16; 'subject:Problem': 0.16; 'syntaxerror:': 0.16; 'fix': 0.17; 'wrote:': 0.18; 'hey': 0.18; 'pointed': 0.19; 'possible,': 0.19; 'feb': 0.22; '>>>': 0.22; 'email addr:gmail.com&gt;': 0.22; '&gt;&gt;&gt;': 0.24; 'guys': 0.24; 'question': 0.24; '&gt;': 0.26; 'header:In-Reply-To:1': 0.27; 'point': 0.28; 'am,': 0.29; 'message-id:@mail.gmail.com': 0.30; 'url:mailman': 0.30; 'program,': 0.31; '"",': 0.31; 'sep': 0.31; 'anyone': 0.31; 'file': 0.32; 'run': 0.32; 'url:python': 0.33; 'running': 0.33; 'to:name:python-list': 0.33; "can't": 0.35; 'something': 0.35; 'received:google.com': 0.35; 'google': 0.35; 'var': 0.36; 'url:listinfo': 0.36; 'url:org': 0.36; 'two': 0.37; 'skip:& 10': 0.38; 'to:addr:python-list': 0.38; 'skip:& 20': 0.39; 'to:addr:python.org': 0.39; 'changed': 0.39; 'skip:p 20': 0.39; 'url:mail': 0.40; 'how': 0.40; 'first': 0.61; 'more': 0.64; 'miss': 0.74; '10:43': 0.84; 'divide': 0.84; '2013,': 0.91; '<>*': 0.95
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 :content-type; bh=ueN4lNu5KuGbG2FQd1S8uji8DUbdODqIZMkNDm+tAU0=; b=nIqmwo6PuId0To7s4yHbSNeQjEKhZ5e/KspTLvzTStdnKSk/9OK7ysjMHjShCDLDvu v7uBJBd9TFbWNOpFtLjDOn4CbjMYUFmwHPWlK67IycIt87TiDQcjsKqm7hARRdvHKebU 4bNAZxofbrIHUmQwS8WcypY+pOhgVw9Rh4Gpu75S+CmHdTIcvPwLgo2XoK4CPc/ntZSC 7WcrUagSNTlELkL2lM+Ml/6i2mrVDJzF0gC+c6MWcSJdWvf2Zo1pUKXxNvgD8lJKRIrf sTcnI5G8gnibVri7Ihz1qC+JgCByrPrhl4PewsbgiP5fs+r+GtMpn9OZPgD0jHdZp04P Lmow==
MIME-Version 1.0
X-Received by 10.140.82.8 with SMTP id g8mr64404244qgd.88.1391529256897; Tue, 04 Feb 2014 07:54:16 -0800 (PST)
In-Reply-To <ed1c2ddd-f704-4d58-a5a4-aef13de88817@googlegroups.com>
References <608a3384-525b-4879-82d2-5a6414827fa7@googlegroups.com> <ed1c2ddd-f704-4d58-a5a4-aef13de88817@googlegroups.com>
Date Tue, 4 Feb 2014 10:54:16 -0500
Subject Re: Calculator Problem
From David Hutto <dwightdhutto@gmail.com>
To python-list <python-list@python.org>
Content-Type multipart/alternative; boundary=001a11c119820d523104f196a7f8
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.6392.1391529261.18130.python-list@python.org> (permalink)
Lines 290
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1391529262 news.xs4all.nl 2858 [2001:888:2000:d::a6]:55235
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:65433

Show key headers only | View raw


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

Missed that it's already pointed out, was looking at the google groups
combined email.



On Tue, Feb 4, 2014 at 10:43 AM, David Hutto <dwightdhutto@gmail.com> wrote:

> On Sunday, February 2, 2014 4:16:44 PM UTC-5, 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:'))
> >
> >     2 = float(input('Second Number:'))
> >
> >     print('Your Final Result is:', 1 + 2)
> >
> >
> >
> >
> >
> > 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()
>
> Can anyone point out how using an int as a var is possible, unless it's
> something I miss that changed in 3.3 from 3.2:
>
> david@david:~$ python3.2
> Python 3.2.3 (default, Sep 25 2013, 18:25:56)
> [GCC 4.6.3] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> 7 = float(input('First Number:'))
>   File "<stdin>", line 1
> SyntaxError: can't assign to literal
> >>>
>
> david@david:~$ python
> Python 2.7.3 (default, Sep 26 2013, 20:08:41)
> [GCC 4.6.3] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> 7 = float(input('First Number:'))
>   File "<stdin>", line 1
> SyntaxError: can't assign to literal
> >>>
>
> --
> https://mail.python.org/mailman/listinfo/python-list
>



-- 
Best Regards,
David Hutto
*CEO:* *http://www.hitwebdevelopment.com <http://www.hitwebdevelopment.com>*

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