Skip to content

Instantly share code, notes, and snippets.

View rostyq's full-sized avatar
🇺🇦
remember: russia is a terrorist state

Rostyslav Bohomaz rostyq

🇺🇦
remember: russia is a terrorist state
View GitHub Profile
num = input("Input a number: ")
num = int(num)
rng = range(1,num+1)
new_rng = [i for i in rng if num % i ==0]
print(new_rng)
a = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89]
num = input('Input a number: ')
num = int(num)
b = [i for i in a if i < num]
print(b)
while True:
try:
check = input("Input a natural number.\n->")
if check == 'exit': break
num = input("Input a divider.\n->")
if num == 'exit': break
check = int(check)
num = int(num)
if check % 4 == 0:
print("{0} is multiple of 4.".format(check))
from time import strftime
now = int(strftime("%Y"))
name = input("What is your name?\n->")
years = list(range(100))
while True:
try:
age = int(input("How old are you?\n->"))
if age not in years: