Skip to content

Instantly share code, notes, and snippets.

View daythatidie's full-sized avatar

Michael Grachev daythatidie

  • Russian Federation, Moscow
View GitHub Profile
a = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89]
num = int(input('Enter num: '))
output = ''
b = []
for i in a:
if i < num:
b.append(i)
output += str(i) + ' '
print(output)
print(b)
# ----------- Exercise 2
number = int(input('Enter number: '))
if number % 4 == 0:
print('Multiple to 4')
elif number % 2 == 0:
print('Even')
else:
print('Odd')
@daythatidie
daythatidie / gist:c078e6c13e4e07abdef46d3f8079c97e
Last active May 14, 2019 13:58
Practicepython Exercise 1
# --------- Exercise 1
name = input('Enter your name: ')
age = int(input('Enter your age: '))
year = 2019 - age + 99
result = f'Hi, {name}! You will be 100 years old in {year} year.'
print(result)
number = int(input('Enter number'))