Skip to content

Instantly share code, notes, and snippets.

@jsnns
Created March 30, 2017 21:45
Show Gist options
  • Save jsnns/df1e54a4c6566ea721444014d84019b5 to your computer and use it in GitHub Desktop.
Save jsnns/df1e54a4c6566ea721444014d84019b5 to your computer and use it in GitHub Desktop.
Day1
# arrays
integer = input("What's your favorite number? ")
if integer == 13:
print("LIAR!")
elif integer == 7:
print("You must be Marshal")
else:
print("Cool your favorite number is: " + str(integer))
times = input("Number of time (n): ")
sum = 1
for n in range(1, times+1): # if n < times: 101
sum = sum * (n)
print(sum)
times = input("input a number")
sum = 1
for n in range(1, times):
sum = sum * (n*n)
print(sum)
def square(n=0):
value = n*n
return value
print(square(3))
print(square(9))
print(square(12))
print(square(15))
def marshal(n=2):
value= n/n
return value
print(marshal(3+3))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment