Advertisement
KodingKid

Basic Cryptocurrency System in Python

Apr 26th, 2021
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.50 KB | None | 0 0
  1. wallet = 0 #creates a "wallet" variable
  2. import random #adds random generations
  3. for x in range(100000): #makes 100,000 random numbers
  4. print(random.randint(-1000001,1000001)) #between -1,000,001 and 1,000,001
  5. if input == random.randint: #if input is the same as one of the random numbers...
  6.     wallet + 1 #you get 1 more in your wallet
  7. print(wallet * 0.01) #your wallet is 1 pence, so this will times (or divide as it is a decimal) the currency in your wallet to equal the amount of real-world currency
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement