What do you want to save?
Add Code snippet
New code examples
-
-
Python 2021-09-04 20:46:04
blockchain private key generator
import ecdsa import random import hashlib b58 = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz' def privateKeyToWif(key_hex): return base58CheckEncode(0x80, key_hex.decode('hex')) def privateKeyToPublicKey(s): sk = ecdsa.Si... Add solution -
Python 2021-09-04 11:39:01
how to make a dice program in python
import random run = 1 level = 0 while(run == 1): print("**ROUND " + str(level) + "**") print("player 1: ",random.randint(0, 6)) print("player 2: ",random.randint(0, 6)) run = int(inp... Add solution -
Python 2021-09-04 08:52:02
xarray add coordinate
>>> da = xr.DataArray( ... np.random.rand(4), ... coords=[np.array([358, 359, 0, 1])], ... dims="lon", ... ) >>> da <xarray.DataArray (lon: 4)> array([0.5488135 , 0.71518937, 0.60276338, 0.54488318]) Coordinat... Add solution -
Python 2021-09-03 23:16:02
atm python program
# ATM Processes while True: # Reading id from user id = int(input("\nEnter account pin: ")) # ... Add solution -
Other 2021-09-03 20:49:01
Generate 10 verification codes of length 4 and print them, e.g.,
#random package to find random integer import random #This method returns a random value of given length #len - parameter determines the length of the random value def random_value(len): result = '' #len decrements with each iteration #Hence... Add solution -
Python 2021-09-03 13:30:01
python roll dice 100 times graph results
import numpy as np import random import matplotlib.pyplot as plt def die_roll(rollnum, maxdots=6, ausgabe=""): all_rolls = np.random.randint(1, maxdots+1, size=rollnum) if "T" in ausgabe.upper(): i = 1 ... Add solution -
Python 2021-09-01 06:38:03
python lottery simulation
import random correct = 0 total = 0 run = 1 howmany = int(input("How many correct guesses should there be? (0-6) ")) if howmany < 0: print("That was below 0.") quit() elif howmany > 6: print("That was over 6.&... Add solution -
Python 2021-09-01 01:47:01
how to make print float value without scientific notation in dataframe in jupyter notebook
In [25]: pd.set_option('display.float_format', lambda x: '%.3f' % x) In [28]: Series(np.random.randn(3))*1000000000 Out[28]: 0 -757322420.605 1 -1436160588.997 2 -1235116117.064 dtype: float64 Add solution
Best helpers
Ranking is empty