Skip to content

Instantly share code, notes, and snippets.

View vikychoi's full-sized avatar
💭
I am trying to be a script kiddie

Viky vikychoi

💭
I am trying to be a script kiddie
View GitHub Profile
@vikychoi
vikychoi / Ex1
Last active November 5, 2017 03:29
name = input("name input")
age = input("age input")
iteration = input("iteration")
iteration = int(iteration)
age = int(age)
year = 100 - age
for _ in range(iteration):
print(name, "u will be 100 years old after ", year, " years", end="")
k = int(input("input a number"))
d = int(input("give me a number to devide"))
if k/d == 0 :
print("it has been divided evenly")
else:
print("it had not been divided evenly")
if k % 2 == 1:
print("it is an odd number")
elif k%4 == 0 and k > 4:
print("it is multiple of 4")
a = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89]
b=[]
c=[]
number = int(input("gimme a number"))
for k in a:
if k<5:
b.append(k)
print(b)
@vikychoi
vikychoi / Ex4
Last active November 5, 2017 04:34
k = int(input("give me a number"))
a = []
for divisor in range(1, k+1):
print(divisor)
if k%divisor == 0:
a.append(divisor)
print(a)
import random
a = []
b = []
c=[]
p = random.randint(1,9)
for _ in range(p):
q = random.randint(0,9)
a.append(q)
a=[]
b=[]
length = int(input("how long is the list"))
for _ in range(length):
a.append(input("please input item into the list"))
b = (a[::-1])
if a == b:
print("its a palindrome")
a = [1, 4, 9, 16, 25, 36, 49, 64, 81, 100]
b=[]
for i in a:
if i%2 == 0:
b.append(i)
print(b)
# i will do player vs comp
import random
will = 1
while will == 1:
player = input("rock, paper, scissors")
comp = random.randint(1,3)
if comp ==1:
comp = "rock"
import random
number = random.randint(1,9)
print("type exit to leave")
attempt = 1
while True:
guess = input("please guess a number from 1 to 9")
if guess != "exit":
import random
a=[]
b=[]
c=[]
for i in range (random.randint(10,20)):
a.append(random.randint(1,100))