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


Groups > comp.lang.python > #63682

Re: python first project

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.025
X-Spam-Evidence '*H*': 0.95; '*S*': 0.00; 'shifting': 0.09; 'cc:addr :python-list': 0.11; 'python': 0.11; 'jan': 0.12; 'mostly': 0.14; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'program...': 0.16; 'subject:python': 0.16; 'sat,': 0.16; 'wrote:': 0.18; 'subject:project': 0.19; 'not,': 0.20; 'cc:addr:python.org': 0.22; 'this?': 0.23; 'instead.': 0.24; 'cc:2**0': 0.24; 'header:In-Reply-To:1': 0.27; 'message- id:@mail.gmail.com': 0.30; 'probably': 0.32; 'cases': 0.33; 'trouble': 0.34; "i'd": 0.34; 'something': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'pm,': 0.38; 'moving': 0.39; "you're": 0.61; 'save': 0.62; 'purchase': 0.65; 'price': 0.69; 'increasing': 0.74; 'yourself': 0.78; 'to:none': 0.92
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:cc :content-type; bh=TfsvfUFrzBOLZaXT4Alc+ehhlbwgq4+NaoSj3qKtCk4=; b=xqENkQdtDA11edwVcIdOpoXyzjs8rpSJcRjyo61cK4iSMxqCT0y/P+UYoz1BcBzsXJ RmgCekdjjqPi2PtugFEZX36TnMFWrFR3hzRvKBPycq1uDVzh526mDJHSbnbnZnEvtMPf F4UHdAFEkqX+zDuEk8RKtOcBV/IBllUlIlRwxbLHYaLlSBeaj7qjYLk+cEiwiDWSFMq+ kB/dSW73trCITIPXi+y4+EvTN8Bh+rFx1LjVcYg2VI37y3ETF903BNUabuRNts9YI4pN llShk+Cp3FdSM05ev/NFh0J3I0nP1E9AKuHJQeJ30sRBbaVSmnKZQ3mqADTMiR3KORKH qHLw==
MIME-Version 1.0
X-Received by 10.68.162.66 with SMTP id xy2mr16206662pbb.46.1389414579145; Fri, 10 Jan 2014 20:29:39 -0800 (PST)
In-Reply-To <ae47738d-b16a-4567-bdd9-07d18db5fc77@googlegroups.com>
References <ae47738d-b16a-4567-bdd9-07d18db5fc77@googlegroups.com>
Date Sat, 11 Jan 2014 15:29:39 +1100
Subject Re: python first project
From Chris Angelico <rosuav@gmail.com>
Cc "python-list@python.org" <python-list@python.org>
Content-Type text/plain; charset=UTF-8
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.5317.1389414582.18130.python-list@python.org> (permalink)
Lines 16
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1389414582 news.xs4all.nl 2908 [2001:888:2000:d::a6]:59066
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:63682

Show key headers only | View raw


On Sat, Jan 11, 2014 at 3:18 PM, ngangsia akumbo <ngangsia@gmail.com> wrote:
>     purch_price = input("Please enter the price for purchase made: ")
>     purch_p = raw_input("Please enter the reason of this purchase made: ")

Never use input() in a Python 2 program... always use raw_input()
instead. You're mostly right, but you have a few cases where you're
using input(). Probably what you want is int(input()) or
float(input()).

Incidentally, is there a strong reason for using Python 2 for this? If
not, I'd recommend moving immediately to Python 3, as there are an
increasing number of advantages. Unless something actually binds you
to Py2, save yourself the trouble of shifting in a few years' time and
just use Py3 now.

ChrisA

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


Thread

python first project ngangsia akumbo <ngangsia@gmail.com> - 2014-01-10 20:18 -0800
  Re: python first project Chris Angelico <rosuav@gmail.com> - 2014-01-11 15:29 +1100
    Re: python first project ngangsia akumbo <ngangsia@gmail.com> - 2014-01-11 08:31 -0800
      Re: python first project Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-01-11 16:40 +0000
  Re:python first project Dave Angel <davea@davea.name> - 2014-01-11 08:06 -0500
    Re: python first project ngangsia akumbo <ngangsia@gmail.com> - 2014-01-11 08:28 -0800
      Re: python first project Dave Angel <davea@davea.name> - 2014-01-11 19:15 -0500
  Re: python first project Denis McMahon <denismfmcmahon@gmail.com> - 2014-01-11 16:28 +0000
  Re: python first project Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2014-01-11 12:17 -0500
    Re: python first project ngangsia akumbo <ngangsia@gmail.com> - 2014-01-11 09:55 -0800
      Re: python first project Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2014-01-11 17:10 -0500
        Re: python first project ngangsia akumbo <ngangsia@gmail.com> - 2014-01-11 21:14 -0800
          Re: python first project Chris Angelico <rosuav@gmail.com> - 2014-01-12 17:04 +1100
            Re: python first project ngangsia akumbo <ngangsia@gmail.com> - 2014-01-11 23:30 -0800
          Re: python first project Emile van Sebille <emile@fenx.com> - 2014-01-12 08:37 -0800
            Re: python first project ngangsia akumbo <ngangsia@gmail.com> - 2014-01-12 08:47 -0800
          Re: python first project MRAB <python@mrabarnett.plus.com> - 2014-01-12 18:50 +0000
      Re: python first project Chris Angelico <rosuav@gmail.com> - 2014-01-12 09:15 +1100
  Re: python first project Wolfgang Keller <feliphil@gmx.net> - 2014-01-11 19:34 +0100

csiph-web