Skip to content

Instantly share code, notes, and snippets.

View hiramf's full-sized avatar

Hiram Foster hiramf

View GitHub Profile
{
"name": "OhioStakePool",
"description": "Ohio Stake Pool",
"ticker": "OHIO",
"homepage": "https://ohiopool.app"
}
@hiramf
hiramf / ex18.py
Last active March 12, 2017 00:10
PracticePython.org Excercise 18
# -*- coding: utf-8 -*-
#Excercise 18: Cows and Bulls Game
'''
This is the given example for what the __main__ method does:
def square(num):
return num * num
if __name__=="__main__":
user_num = input("Give me a number: ")
@hiramf
hiramf / gist:62f943075285e1fedd7812ed48425746
Created March 1, 2017 04:01
Exercise 9: Guessing Game
import random
def new():
x = random.randint(1,9)
return x
def game(x,n,y):
while True:
g = (input("guess: "))
if g == "exit":
print("game over.")
@hiramf
hiramf / gist:ecc569963d6f8f517a176370ec643bbf
Created February 28, 2017 18:42
Practice Python: Exercise 4
# -*- coding: utf-8 -*-
b = int(input("please enter an integer:\n"))
print ("The divisors for " + str(b) + " are: ")
for i in range(1,b+1):
if b%i==0:
print(i)
x = [i for i in range(1,b+1) if b%i==0]
print("here is a list of your divisors for " + str(b) + ":\n" + str(x))