This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
birthday = input('What is your birthday (yyyy/mm/dd)? ') | |
print("You entered:",birthday) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#My opening explanation | |
print(""" | |
Welcome to the Green Room. Where you can have | |
coffee but not tea, a muffin but not cake, and | |
pet a giraffe but not a cat. | |
Please ask me about an object and I'll tell you | |
if it is allowed. Tell me "quit" to stop the game. | |
You'll have to decide for yourself when you've won. | |
""") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import urllib.request | |
filename, headers = urllib.request.urlretrieve('http://api.icndb.com/jokes/random') | |
response = open(filename) | |
json = eval(response.read()) | |
print(json['value']['joke']) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import email | |
import dateutil.parser | |
import sqlite3 | |
mail = sys.stdin.read() | |
msg = email.message_from_string(mail) | |
datetime = dateutil.parser.parse(msg["DATE"]) | |
thedata = { | |
"subject" : msg["SUBJECT"], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random, os, sys, time | |
#Animate some ASCII art (thanks Philip: http://stackoverflow.com/a/2785568/1347629) | |
def draw_to_screen(content): | |
clear_console = 'clear' if os.name == 'posix' else 'CLS' | |
os.system(clear_console) | |
sys.stdout.write(content) | |
sys.stdout.flush() | |
time.sleep(0.2) | |
#Some randomized snow |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random, os, sys, time | |
#Animate some ASCII art (thanks Philip: http://stackoverflow.com/a/2785568/1347629) | |
def draw_to_screen(content): | |
clear_console = 'clear' if os.name == 'posix' else 'CLS' | |
os.system(clear_console) | |
sys.stdout.write(content) | |
sys.stdout.flush() | |
time.sleep(0.2) | |
def board(w, h, x, y): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<iostream> | |
int main(){ | |
int number_of_rounds = 0; | |
std::cin >> number_of_rounds; | |
int k = 0; | |
for(int i = 0; i < number_of_rounds; i++){ | |
for(int j = 0; j < number_of_rounds; j++){ | |
k = j; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<iostream> | |
int main(){ | |
unsigned long number_of_rounds = 0; | |
std::cin >> number_of_rounds; | |
unsigned long j = 0; | |
for(unsigned long i = 0; i < number_of_rounds; i++){ | |
j = i; | |
} | |
return 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<iostream> | |
#include<string> | |
int main(){ | |
unsigned long number_to_hit; | |
std::cin >> number_to_hit; | |
unsigned long j = 0; | |
for(unsigned long i = 0; j < number_to_hit; i++){ | |
j = i * i; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<iostream> | |
#include<string> | |
int main(){ | |
std::string number_of_rounds; | |
std::cin >> number_of_rounds; | |
int j = 0; | |
for(int i = 0; i < number_of_rounds.length(); i++){ | |
j = i; | |
} |