Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!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.022 X-Spam-Evidence: '*H*': 0.96; '*S*': 0.00; 'function,': 0.09; 'subject:Help': 0.11; 'python': 0.11; 'suggest': 0.14; '10:45': 0.16; 'dangerous,': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'integer,': 0.16; 'so.': 0.16; 'wrote:': 0.18; 'print': 0.22; 'tells': 0.24; 'header:In-Reply- To:1': 0.27; 'converting': 0.30; 'robert': 0.30; 'message- id:@mail.gmail.com': 0.30; "i'm": 0.30; "user's": 0.31; 'guess': 0.33; 'problem': 0.35; 'subject:with': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'version': 0.36; 'needed': 0.38; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'to:addr:python.org': 0.39; "you're": 0.61; 'name': 0.63; 'between': 0.67; '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=FOwX6i22AIxYSJMDv9LcwkimLY6EVE6n84+ueuyxLTQ=; b=syYaKRGoDoXHQni2nRbaNVizgkHHHP/1BgT6YlzbT5hmo0NuRqNoAwPz+zdOCai4vg /1ss2vDtSLK4nX+cg79PjXl7l/AoWOn0fwBNnx/tA+EPWwgkGmflQLgn26vzv/Zb0Z0v QEYE6N+sQonpu1NSexPkPZueIM2KCUdrRQodjhPBjgufNiA1QbZEM7nMqxA3GqZWi1ud 4wYVAm1tl7sdQQz3ZtSYQ3wGeMRgV1nsMrq4t37LmNSn5h8+QkEZrx53Ztj0r53TeKY0 K1VVVq5Z0lcD1OiLfxmr48w8rD0CsFS++zhfrOMaAHA/5PNVpRaJL8+d62ZFIZwLlWXu 5FIg== MIME-Version: 1.0 X-Received: by 10.68.234.165 with SMTP id uf5mr26497931pbc.41.1383047635560; Tue, 29 Oct 2013 04:53:55 -0700 (PDT) In-Reply-To: <37245746-51cc-4040-9493-1921369023fb@googlegroups.com> References: <37245746-51cc-4040-9493-1921369023fb@googlegroups.com> Date: Tue, 29 Oct 2013 22:53:55 +1100 Subject: Re: Help with guessing game :D From: Chris Angelico 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 15 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1383047638 news.xs4all.nl 15998 [2001:888:2000:d::a6]:47949 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:57905 On Tue, Oct 29, 2013 at 10:45 PM, Robert Gonda wrote: > N = raw_input() #What the user's name is > print(N + ", I'm thinking of a number between 1-1000") #Not needed but tells the user their name and tells them that it's thinking of a number betweeen 1 to 1000 > guess = input() > guess = int(guess) Which version of Python are you using? The raw_input call is very Python 2, but you're using print as a function, and then you're converting input()'s result to an integer, both of which suggest Python 3.x. If you're using Python 2, do NOT use input() - it is dangerous, deceptively so. In Python 3, that problem no longer applies. ChrisA