Skip to content

Instantly share code, notes, and snippets.

View chookity-pokk's full-sized avatar

Hank Greenburg chookity-pokk

View GitHub Profile
@chookity-pokk
chookity-pokk / gist:168cf266455f872900d80555122df07d
Created August 8, 2018 03:26
Rock Paper Scissors in Python3
#!/bin/python3
from random import randint
player = input('rock (r), paper (p), scissors (s)')
print(player, 'vs', end=' ')
chosen = randint(1,3)
#print(chosen)
@chookity-pokk
chookity-pokk / Tip Calculator
Last active July 10, 2018 01:26
Tip calculator in python
#Tip calculator
bill = raw_input("Enter bill amount:\n");tip = raw_input("Enter tip percentage:\n")
total = int(bill) * float(tip) + int(bill)
print("Your bill total will be, " + str(total) + " dollars.")
"""
Python program that prints out list elements less than a certain number
Hank Greenburg
Date: 6/28/2018
"""
a = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89]
for element in a:
if element <= 5:
print(element)
#Above is my program and below is the exact solution.
@chookity-pokk
chookity-pokk / Odd or Even
Created June 29, 2018 05:34
Python program that tells you if your inputted number is odd or even
"""
Python program that tells me if a number is odd or even
Hank Greenburg
Date: 6/28/2018
"""
num = input("Pick a number, any number:\n")
if num % 2 == 0:
print("Your number is even.")
else:
print("Your number is odd.")
@chookity-pokk
chookity-pokk / 100 years
Created June 29, 2018 05:20
A python program that tells you when you turn 100.
"""
Python program
Hank Greenburg
Purpose: Create a program that asks the user to enter their name and their age.
Print out a message addressed to them that tells them
the year that they will turn 100 years old.
date: 6/28/2018
"""
#To Do list:
#User input of age[*]