Re: [Tutor] Guess the number

2015-05-11 Thread Kewal Patel
i don't know if this is efficient but i think it works just fine import random # input a number from user input_number = input("Enter a number") #function defination def guess_number(start,stop): global input_number try: g_number = random.randrange(start,stop) if g

Re: [Tutor] Guess the number

2015-05-07 Thread Alan Gauld
On 07/05/15 05:09, Ikaia Leleiwi wrote: number might be. If the guess is lower then the inputted number then the user inputs the word 'higher' to indicate the computer needs to guess a higher number. If the guess is higher than the inputted number then the user inputs the word 'lower' to indic

[Tutor] Guess the number

2015-05-07 Thread Ikaia Leleiwi
I am having trouble writing a program that guesses a number inputted by the user. A number between 1-100 is inputted into the program and the computer produces a random integer that is the "guess" as to what the inputted number might be. If the guess is lower then the inputted number then the use

Re: [Tutor] guess the number game help

2005-04-30 Thread Diana Hawksworth
uot;Max Noel" <[EMAIL PROTECTED]> Cc: "Diana Hawksworth" <[EMAIL PROTECTED]>; Sent: Sunday, May 01, 2005 6:58 AM Subject: Re: [Tutor] guess the number game help > > > And if they do understand it and know how to modify it then even > if > > > t

Re: [Tutor] guess the number game help

2005-04-30 Thread Alan Gauld
> > And if they do understand it and know how to modify it then even if > > they did copy it they did the assignment and understood the code. > > Software reuse is not necessarily an evil to be stifled... > > > Have a look at the link I posted, Alan. Honestly, at that point > it's not "softwar

Re: [Tutor] guess the number game help

2005-04-30 Thread Max Noel
On Apr 30, 2005, at 19:50, Alan Gauld wrote: If my student has plagiarised - I need to know. Could you ask him(?) to explain some of the more "interesting" features? Maybe how he came up with the variable names? It is possible that he/she has come up with it themselves since its not really a great

Re: [Tutor] guess the number game help

2005-04-30 Thread Alan Gauld
> If my student has plagiarised - I need to know. Could you ask him(?) to explain some of the more "interesting" features? Maybe how he came up with the variable names? It is possible that he/she has come up with it themselves since its not really a great version - a very strange mix of OOP and pr

Re: [Tutor] guess the number game help

2005-04-30 Thread Max Noel
On Apr 30, 2005, at 09:49, Diana Hawksworth wrote: Hello list!   I have started teaching Python to a group of High School students. I set them the "Guess the Number" game as a GUI as an assignment. One of the students has passed in some script that is foreign to any tutorial work we have done. 

[Tutor] guess the number game help

2005-04-30 Thread Diana Hawksworth
Hello list!   I have started teaching Python to a group of High School students. I set them the "Guess the Number" game as a GUI as an assignment. One of the students has passed in some script that is foreign to any tutorial work we have done.  Some of it is below. Does anyone recognise it