Skip to content

Instantly share code, notes, and snippets.

@dobrienSTJ
Last active January 17, 2018 11:11
Show Gist options
  • Save dobrienSTJ/4df6b6772e1aad23275b4777dbe01b5c to your computer and use it in GitHub Desktop.
Save dobrienSTJ/4df6b6772e1aad23275b4777dbe01b5c to your computer and use it in GitHub Desktop.
Python
from time import sleep #time for our program
import webbrowser #web design
import math #maths functions
import string
import random
import time
def square(x,y): #functions for a square
return x*y
list(string.ascii_lowercase)
print (string.ascii_lowercase[12:18])
print(random.choice(foo))
alphabetletters = string.ascii_lowercase
webbrowser.open_new_tab("google.com")
print("Welcome to the Python Atomic Clock") #Welcome to the Python Atomic Clock
sleep(3)
hello=("Hello") #Strings
sleep(3)
print(hello) #print: Hello
sleep(3)
mynewlist = ["Yes", "No", "Maybe"]
print(mynewlist) #Print the Whole List
print(mynewlist[1:3]) #Print a section
for x in range(1,20): #prints a timer
print(x)
sleep(1)
square(2,4)
while True:
yes=input("Type NOW!")
if yes == "no" or yes == "yes":
print("Confusion-")
elif yes != "yes" and yes != "no":
print(".")
else:
break
time_minutes = 0
time_hours = 0
def minutes():
while True:
sleep(60)
time_minutes = time_minutes + 1
def hours():
while True:
sleep(3600)
time_hours = time_hours + 1
hours()
minutes()
class Shape:
def __init__(self, x, y):
self.x = 6
self.y = 6
def area(self):
return self.x * self.y
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment