@Brawn/

Quiz 1

Python

No description

fork
loading
Files
  • main.py
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
def cc():
	count = int(input("How far do you want to mave your Caesar Cipher? "))
	letter = ["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", " "]
	ciper = ["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", " "]
	for i in range(count):
		ciper.insert(0, ciper.pop(-1))
	originalMessage = input("What message would you like to encode? ")
	encodedMessage = ""
	for i in originalMessage:
		encodedMessage += ciper[letter.index(i)]
	print(encodedMessage)


def pyth():
	a = int(input("What is the length of side A? "))
	b = int(input("What is the length of side B? "))
	c = int(input("What is the length of side C? "))
	if a = -1:
		length = (c**2 - b**2)**.5
		print (length)
	elif b = -1:
		length = (c**2 - a**2)**.5
		print (length)
	else:
		length = (a**2 - b**2)**.5
		print (length)