Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #54527
| Path | csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!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.009 |
| X-Spam-Evidence | '*H*': 0.98; '*S*': 0.00; 'subject:not': 0.03; 'interpreter': 0.05; 'output': 0.05; '21,': 0.07; 'interpreter.': 0.07; 'indicates': 0.09; 'python': 0.11; 'argument.': 0.16; 'both,': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'later)': 0.16; 'subject:Print': 0.16; 'sat,': 0.16; 'wrote:': 0.18; 'input': 0.22; '2.x': 0.24; '(or': 0.24; 'switch': 0.26; 'header:In-Reply-To:1': 0.27; 'function': 0.29; 'am,': 0.29; 'said,': 0.30; 'strongly': 0.30; 'message- id:@mail.gmail.com': 0.30; '3.x': 0.31; 'sep': 0.31; 'there.': 0.32; 'up.': 0.33; 'running': 0.33; 'advice': 0.35; 'received:google.com': 0.35; 'version': 0.36; 'really': 0.36; 'should': 0.36; 'behind': 0.37; 'to:addr:python-list': 0.38; 'extremely': 0.39; 'to:addr:python.org': 0.39; 'dangerous': 0.60; 'simple': 0.61; "you're": 0.61; "you'll": 0.62; 'total': 0.65; 'improvements': 0.68; 'sam': 0.68; 'evaluate': 0.72; 'subject:printing': 0.84; 'differences': 0.93; '2013': 0.98 |
| 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=LbSGQWdSPnsvrGxQbMvPLEzuXpIfhmRt87cgY7BHDSY=; b=qfpWuLPP0r2EZtP3s8zNCJLPwppp5YPX7lufKsQtfHvejJaXd76nkBIt7VzEhOpM30 inoVivMZGs09pbabDsmxQC9o2Qz0168uu5U/Gd1AwubLuHl/blJOcCnqBTkOwU4uzL8G wtKeVlpbWLAo51mFBzZpDx8ih0Bw9E8HHDGx9RTrZnhHx2Jjgg+N8paQLx4LRSgpRdZi K/7gegCHVSGo3bSaZZC5jE6rcJcNOE9vyZYlGLtJiqgcXoiavVqVK65bau/DYiTA/g0U a1gR+ucZUw1vWrowWSuF93HLrLb36Zi2tqkROrNv4+BpRVeYOf0AUPkehv1RyGdUEuVL 1y3A== |
| MIME-Version | 1.0 |
| X-Received | by 10.52.107.226 with SMTP id hf2mr8064270vdb.2.1379731832558; Fri, 20 Sep 2013 19:50:32 -0700 (PDT) |
| In-Reply-To | <05bbf1a3-6480-48ee-8984-2482b90c79c0@googlegroups.com> |
| References | <05bbf1a3-6480-48ee-8984-2482b90c79c0@googlegroups.com> |
| Date | Sat, 21 Sep 2013 12:50:32 +1000 |
| Subject | Re: Print statement not printing as it suppose to |
| From | Chris Angelico <rosuav@gmail.com> |
| To | python-list@python.org |
| Content-Type | text/plain; charset=ISO-8859-1 |
| 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.212.1379731840.18130.python-list@python.org> (permalink) |
| Lines | 19 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1379731840 news.xs4all.nl 15919 [2001:888:2000:d::a6]:48199 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:54527 |
Show key headers only | View raw
On Sat, Sep 21, 2013 at 7:57 AM, Sam <anasdahany@gmail.com> wrote:
> car=int(input("Lamborghini tune-up:"))
> print("\nThe total amount required is ", total )
> OUTPUT
> ('\nThe total amount required is ', 3534)
As others have said, this output indicates that you're running under a
Python 2.x interpreter. I strongly recommend you switch to running
under Python 3.x - do not take the simple advice that might make it
work in both, because you have other differences which will trip you
up. In Python 2, the input function is extremely dangerous and should
be avoided: it *evaluates* its argument. (If you really *want* to
evaluate something, you can call the eval() function explicitly. You
don't want it to be hidden behind the innocuously-named input().)
Download Python 3.3 (or later) and start using that; you'll find it's
by far the better interpreter - years of improvements on top of the
version you're using there.
ChrisA
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Print statement not printing as it suppose to Sam <anasdahany@gmail.com> - 2013-09-20 14:57 -0700 Re: Print statement not printing as it suppose to Tim Delaney <timothy.c.delaney@gmail.com> - 2013-09-21 08:11 +1000 Re: Print statement not printing as it suppose to Emiliano Carlos de Moraes Firmino <emiliano.firmino@gmail.com> - 2013-09-20 18:11 -0400 Re: Print statement not printing as it suppose to John Gordon <gordon@panix.com> - 2013-09-20 22:40 +0000 Re: Print statement not printing as it suppose to Chris Angelico <rosuav@gmail.com> - 2013-09-21 12:50 +1000 Re: Print statement not printing as it suppose to Dave Angel <davea@davea.name> - 2013-09-21 04:40 +0000
csiph-web