Home » Source Code » Python c example precision test

## Description

import random guesses_made = 0 name = raw_input('Hello! What is your name?\n') number = random.randint(1, 20) print 'Well, {0}, I am thinking of a number between 1 and 20.'.format(name) while guesses_made < 6: guess = int(raw_input('Take a guess: ')) guesses_made += 1 if guess < number: print 'Your guess is too low.' if guess > number: print 'Your guess is too high.' if guess == number: break if guess == number: print 'Good job, {0}! You guessed my number in {1} guesses!'.format(name, guesses_made) else: print 'Nope. The number I was thinking of was {0}'.format(number)

`import random  guesses_made = 0  name = raw_input('Hello! What is your name?\n')  number = random.randint(1, 20) print 'Well, {0}, I am thinking of a number between 1 and 20.'.format(name)  while guesses_made < 6:   guess = int(raw_input('Take a guess: '))   guesses_made += 1   if guess < number:  print 'Your guess is too low.'   if guess > number:  print 'Your guess is too high.'   if guess == number:  break  if guess == number:  print 'Good job, {0}! You guessed my number in {1} guesses!'.format(name, guesses_made) else:  print 'Nope. The number I was thinking of was {0}'.format(number)`
`import random  guesses_made = 0  name = raw_input('Hello! What is your name?\n')  number = random.randint(1, 20) print 'Well, {0}, I am thinking of a number between 1 and 20.'.format(name)  while guesses_made < 6:   guess = int(raw_input('Take a guess: '))   guesses_made += 1   if guess < number:  print 'Your guess is too low.'   if guess > number:  print 'Your guess is too high.'   if guess == number:  break  if guess == number:  print 'Good job, {0}! You guessed my number in {1} guesses!'.format(name, guesses_made) else:  print 'Nope. The number I was thinking of was {0}'.format(number)`

`import random  guesses_made = 0  name = raw_input('Hello! What is your name?\n')  number = random.randint(1, 20) print 'Well, {0}, I am thinking of a number between 1 and 20.'.format(name)  while guesses_made < 6:   guess = int(raw_input('Take a guess: '))   guesses_made += 1   if guess < number:  print 'Your guess is too low.'   if guess > number:  print 'Your guess is too high.'   if guess == number:  break  if guess == number:  print 'Good job, {0}! You guessed my number in {1} guesses!'.format(name, guesses_made) else:  print 'Nope. The number I was thinking of was {0}'.format(number)`

## File list

Tips: You can preview the content of files by clicking file names^_^
Name Size Date
python.c529.00 B2016-06-28|04:58
python_ext.py529.00 B2016-06-28|04:58
python_init.py529.00 B2016-06-28|04:58
python2.py529.00 B2016-06-28|04:58
python.py529.00 B2016-06-28|04:58
...

Minimum:15 words, Maximum:160 words
• 1
• Sent successfully!
• python_c..zip
• 1 Point(s)

### Python c example precision test(2.00 kB)

Need 1 Point(s)

Get 22 Point immediately by PayPal

More(Debit card / Credit card / PayPal Credit / Online Banking)

Submit your source codes. Get more Points

Don't have an account？ Register now
Need any help?
Mail to: support@codeforge.com

### 切换到中文版？

CodeForge Chinese Version
CodeForge English Version

### ^_^"Oops ...

Sorry!This guy is mysterious, its blog hasn't been opened, try another, please!

### Warm tip!

Favorite by Ctrl+D