Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Random Number Generator

# Random Number Generator
## Small Python Game
## You will win if you guess a number greater than the system generated number

import random

uNum = int(input("Enter a number between 0 and 100: "))
sNum = random.randint(0,100)

if uNum > sNum:
  print("You Win!!!")
else:
  print("Try Again!!!")

print("Your Number:", uNum, "
System Number:", sNum)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Random #Number #Generator
ADD COMMENT
Topic
Name
6+1 =