Skip to content

Instantly share code, notes, and snippets.

View athenalry's full-sized avatar
💡
Building things

athenalry

💡
Building things
View GitHub Profile
import random
def main():
welcome = ['Welcome to Hangman! A word will be chosen at random and',
'you must try to guess the word correctly letter by letter',
'before you run out of attempts. Good luck!'
]
for line in welcome:
print(line, sep='\n')
Hangman = (
"""
-----
| |
|
|
|
|
|
|
import random
def main():
name = input("What's your name? ")
welcome = """\
.----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------.
| .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. |
| | _____ _____ | || | _________ | || | _____ | || | ______ | || | ____ | || | ____ ____ | || | _________ | |
# convertdate.py
def main():
date = input("Enter the date mm/dd/yyyy: ")
month, day, year = date.split("/")
months = [ 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
month = months[int(month)-1]
# decoder2.py
def main():
print("This program converts a sequence of Unicode numbers into")
print("the string of text that it represents. \n")
m = input("Please enter the Unicode-encoded message: ")
chars = []
for n in m.split():
# decoder.py
def main():
print("This program converts a sequence of Unicode numbers into")
print("the string of text that it represents. \n")
n = input("Please enter the Unicode-encoded message: ")
message = ""
for s in n.split():
# encoder.py
def main():
print("This program converts a textual message into a sequence")
print("of numberes representing the Unicode encoding of the message")
m = input("Please enter the message to encode:")
for ch in m:
print(ord(ch), end=" ")
// get the button to do something
package com.example.superman.ch6;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;