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: 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: References: Date: Sat, 11 Jan 2014 15:29:39 +1100 Subject: Re: python first project From: Chris Angelico Cc: "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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: 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 On Sat, Jan 11, 2014 at 3:18 PM, ngangsia akumbo 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