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


Groups > comp.lang.python > #57937

Re: Help with guessing game :D

From Neil Cerutti <neilc@norwich.edu>
Newsgroups comp.lang.python
Subject Re: Help with guessing game :D
Date 2013-10-29 17:22 +0000
Organization Norwich University
Message-ID <bda95sFgst9U1@mid.individual.net> (permalink)
References (6 earlier) <0qObu.26731$eW3.17586@fx14.am4> <a307611a-c9f7-4c41-856f-564ab7dbb089@googlegroups.com> <azPbu.26732$eW3.9171@fx14.am4> <99ff184c-8e49-48d5-97f8-1a7be0a57ca0@googlegroups.com> <neRbu.26733$eW3.19770@fx14.am4>

Show all headers | View raw


On 2013-10-29, Alister <alister.ware@ntlworld.com> wrote:
> set the number to be guessed
> get the user input
> step through each digit in the input
> compare to the co-responding digit in the number to be guessed
> generate the required output
>
> actually let me just expand on my earlier teaser code
>
> does this switch on any light-bulbs for you
>
> data='7865'
> guess=input('guess')
> for key,digit in enumerate(data):
> 	print digit,guess[key]

I just want to add that this programming exercise, while pretty
common, stinks.

A new programmer shouldn't be embroiled in the morass of
interactive programming.

-- 
Neil Cerutti

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


Thread

Help with guessing game :D Robert Gonda <robertgonda1994@gmail.com> - 2013-10-29 04:45 -0700
  Re: Help with guessing game :D Chris Angelico <rosuav@gmail.com> - 2013-10-29 22:53 +1100
    Re: Help with guessing game :D Robert Gonda <robertgonda1994@gmail.com> - 2013-10-29 04:54 -0700
      Re: Help with guessing game :D Robert Gonda <robertgonda1994@gmail.com> - 2013-10-29 05:05 -0700
        Re: Help with guessing game :D Alister <alister.ware@ntlworld.com> - 2013-10-29 12:58 +0000
          Re: Help with guessing game :D Robert Gonda <robertgonda1994@gmail.com> - 2013-10-29 06:03 -0700
            Re: Help with guessing game :D Alister <alister.ware@ntlworld.com> - 2013-10-29 13:07 +0000
              Re: Help with guessing game :D Robert Gonda <robertgonda1994@gmail.com> - 2013-10-29 06:10 -0700
                Re: Help with guessing game :D Alister <alister.ware@ntlworld.com> - 2013-10-29 14:25 +0000
                Re: Help with guessing game :D Robert Gonda <robertgonda1994@gmail.com> - 2013-10-29 07:40 -0700
                Re: Help with guessing game :D Alister <alister.ware@ntlworld.com> - 2013-10-29 16:19 +0000
                Re: Help with guessing game :D Neil Cerutti <neilc@norwich.edu> - 2013-10-29 17:22 +0000
                Re: Help with guessing game :D rusi <rustompmody@gmail.com> - 2013-10-29 10:32 -0700
                Re: Help with guessing game :D rusi <rustompmody@gmail.com> - 2013-10-29 09:24 -0700
                Re: Help with guessing game :D Robert Gonda <robertgonda1994@gmail.com> - 2013-10-29 09:31 -0700
                Re: Help with guessing game :D rusi <rustompmody@gmail.com> - 2013-10-29 09:40 -0700
                Re: Help with guessing game :D Robert Gonda <robertgonda1994@gmail.com> - 2013-10-29 10:05 -0700
                Re: Help with guessing game :D rusi <rustompmody@gmail.com> - 2013-10-29 10:13 -0700
                Re: Help with guessing game :D rurpy@yahoo.com - 2013-10-29 10:24 -0700
                Re: Help with guessing game :D Robert Gonda <robertgonda1994@gmail.com> - 2013-10-29 10:45 -0700
                Re: Help with guessing game :D rurpy@yahoo.com - 2013-10-29 11:27 -0700
                Re: Help with guessing game :D Robert Gonda <robertgonda1994@gmail.com> - 2013-10-29 11:35 -0700
                Re: Help with guessing game :D Robert Gonda <robertgonda1994@gmail.com> - 2013-10-29 12:03 -0700
                Re: Help with guessing game :D rurpy@yahoo.com - 2013-10-29 12:55 -0700
                Re: Help with guessing game :D Robert Gonda <robertgonda1994@gmail.com> - 2013-10-29 13:08 -0700
                Re: Help with guessing game :D Robert Gonda <robertgonda1994@gmail.com> - 2013-10-29 13:21 -0700
                Re: Help with guessing game :D rurpy@yahoo.com - 2013-10-29 14:25 -0700
                Re: Help with guessing game :D rusi <rustompmody@gmail.com> - 2013-10-29 10:52 -0700
                Re: Help with guessing game :D Robert Gonda <robertgonda1994@gmail.com> - 2013-10-29 10:55 -0700
                Re: Help with guessing game :D rurpy@yahoo.com - 2013-10-29 11:26 -0700
                Re: Help with guessing game :D rusi <rustompmody@gmail.com> - 2013-10-29 11:32 -0700
  Re: Help with guessing game :D Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-10-29 13:44 +0000
    Re: Help with guessing game :D Robert Gonda <robertgonda1994@gmail.com> - 2013-10-29 06:52 -0700
  Re: Help with guessing game :D Robert Gonda <robertgonda1994@gmail.com> - 2013-10-29 11:05 -0700
    Re: Help with guessing game :D Dave Angel <davea@davea.name> - 2013-10-29 19:09 +0000
      Re: Help with guessing game :D Robert Gonda <robertgonda1994@gmail.com> - 2013-10-29 12:15 -0700
        Re: Help with guessing game :D Dave Angel <davea@davea.name> - 2013-10-30 01:30 +0000

csiph-web