Skip to content

Instantly share code, notes, and snippets.

# "Mr. Nobody Adventure v1" game
# input will come from buttons and an input field
# all output for the game will be printed in the console
import simplegui
import random
import math
attack = 0 #range up to 100
# "Crypto Trading v2" game
# input will come from buttons and an input field
# all output for the game will be printed in the console
import simplegui
import random
import math
# initialize global variables used in your code
num_range = 200
# "Crypto Trading" game
# input will come from buttons and an input field
# all output for the game will be printed in the console
import simplegui
import random
import math
# initialize global variables used in your code
num_range = 200
import simplegui
import random
import math
# Initializing the number of guesses.
count = 0
# helper function to start and restart the game
# "Guess the number" game
# input will come from buttons and an input field
# all output for the game will be printed in the console
import simplegui
import random
import math
# initialize global variables used in your code
num_range = 100
body {
background-color: #242f44;
color: white;
font-family: 'Oswald', sans-serif;
}
header {
text-align: center;
margin-top: 5px;
}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Aguillar Family Wine Festival</title>
<link rel="stylesheet" type="text/css" href="reset.css" />
<link rel="stylesheet" type="text/css" href="style.css" />
<link href="https://fonts.googleapis.com/css?family=Oswald" rel="stylesheet">
</head>
import datetime
from hashlib import sha256
class Block:
def __init__(self, transactions, previous_hash):
self.time_stamp = datetime.datetime.now()
self.transactions = transactions
self.previous_hash = previous_hash
self.nonce = 0
self.hash = self.generate_hash()
<html>
<head>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<button onclick="changeColor()">Repaint!</button>
</body>
# Game of the Rug Pulled v1
# Import the random module
import random
import sys
def number_to_fortune(number):
if number == 0:
return "Your NFTs just got hacked! You lost all your money!"
elif number == 1: