This file contains 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
stages = [''' | |
+---+ | |
| | | |
O | | |
/|\ | | |
/ \ | | |
| | |
========= | |
''', ''' | |
+---+ |
This file contains 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
rock = ''' | |
_______ | |
---' ____) | |
(_____) | |
(_____) | |
(____) | |
---.__(___) | |
''' | |
paper = ''' |
This file contains 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 | |
letters = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', | |
'w', 'x', 'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', | |
'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'] | |
numbers = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'] | |
symbols = ['!', '#', '$', '%', '&', '(', ')', '*', '+'] | |
print("Welcome to the PyPassword Generator!") | |
nr_letters = int(input("How many letters would you like in your password?\n")) | |
nr_symbols = int(input(f"How many symbols would you like?\n")) |
This file contains 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
alphabet = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', | |
'v', 'w', 'x', 'y', 'z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', | |
'q', 'r', 's', 't', 'u', | |
'v', 'w', 'x', 'y', 'z'] | |
direction = input("Type 'encode' to encrypt, type 'decode' to decrypt:\n") | |
text = input("Type your message:\n").lower() | |
shift = int(input("Type the shift number:\n")) | |
This file contains 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
bid_repeat = True | |
while bid_repeat: | |
user_name = input("What is your name?: ") | |
user_bid = int(input("what is your bid amount$$? ")) | |
bid_dict = {} | |
bid_dict[user_name] = user_bid |
This file contains 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
# calculator | |
# ADD | |
def add(n1, n2): | |
return n1 + n2 | |
# subtracting | |
def subtract(n1, n2): | |
return n1 - n2 |
This file contains 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 | |
logo = """ | |
.------. _ _ _ _ _ | |
|A_ _ |. | | | | | | (_) | | | |
|( \/ ).-----. | |__ | | __ _ ___| | ___ __ _ ___| | __ | |
| \ /|K /\ | | '_ \| |/ _` |/ __| |/ / |/ _` |/ __| |/ / | |
| \/ | / \ | | |_) | | (_| | (__| <| | (_| | (__| < | |
`-----| \ / | |_.__/|_|\__,_|\___|_|\_\ |\__,_|\___|_|\_\\ |
This file contains 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
logo = "welcome to number guessing game" | |
print(logo) | |
import random | |
computer_choice = random.randint(1, 101) | |
# print(f"psst! computer's number is {computer_choice}") to test code | |
# Include an ASCII art logo. |
This file contains 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
# step 1 - import logos and random | |
import random | |
logo = """ | |
__ ___ __ | |
/ / / (_)___ _/ /_ ___ _____ | |
/ /_/ / / __ `/ __ \/ _ \/ ___/ | |
/ __ / / /_/ / / / / __/ / | |
/_/ ///_/\__, /_/ /_/\___/_/ |
This file contains 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
MENU = { | |
"espresso": { | |
"ingredients": { | |
"water": 50, | |
"coffee": 18, | |
}, | |
"cost": 1.5, | |
}, | |
"latte": { | |
"ingredients": { |
OlderNewer