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
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)
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")
import random
a = []
b = []
c=[]
p = random.randint(1,9)
for _ in range(p):
q = random.randint(0,9)
a.append(q)
@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)
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)
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")
@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="")