Home » Source Code » Python c example precision test

Python c example precision test

b91503
2016-06-27 17:01:21
The author
View(s):
Download(s): 0
Point (s): 1 
Category Category:
PythonPython AllAll

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)


Sponsored links

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
...
Sponsored links

Comments

(Add your comment, get 0.1 Point)
Minimum:15 words, Maximum:160 words
  • 1
  • Page 1
  • Total 1

Python c example precision test (2.00 kB)

Need 1 Point(s)
Your Point (s)

Your Point isn't enough.

Get 22 Point immediately by PayPal

Point will be added to your account automatically after the transaction.

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

Submit your source codes. Get more Points

LOGIN

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

切换到中文版?

CodeForge Chinese Version
CodeForge English Version

Where are you going?

^_^"Oops ...

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

Warm tip!

CodeForge to FavoriteFavorite by Ctrl+D