# -*- coding: utf-8 -*-
"""
@author: GSB
"""
a=int(input("Enter any Number to test whether it is odd or even:"))
if a%2==0:
print ("The number is even")
else:
print ("The number is odd")
a=int (input ("Enter any Number"))
if a%5==0:
print("Hello")
else:
print("Bye")
a=int(input("Enter a year"))
if a%4==0:
print("It is a leap year")
else:
print("it is not a leap year")
a=int(input("Enter age"))
if a>=18:
print("Eligible for voting")
else:
print("Not eligible for voting")
for num in range(6):
num=num + 1
if num ==3:
continue
print(" Num has value" +str(num))
print('end of loop')
a=int(input("Enter age"))
if a%4==0:
print("Eligible for voting")
else:
print("Not eligible for voting")
num=int(input("what is your number:"))
factorial= 1
if num < 0:
print("sorry,factorial is does not exist for negative numbers")
elif num == 0:
print(" the factorial of 0 is 1")
else:
for i in range(1,num + 1):
factorial= factorial *i
print("the factorial of", num, "is", factorial)
# -*- coding: utf-8 -*-
"""
@author: GSB
"""
"hello" + "world"
"hello"*3
"hello"[0]
"hello"[-4:-1]
len("hello")
Str='Python class'
Str.upper()
Str='Python class'
Str.count('s')
Str='Python class'
Str.swapcase()
li=["abc", 42, 4.55, 233]
li[-1]
li=["abc", 42, 4.55, 233]
li.reverse()
li
li=[5,2,6,8]
li.sort()
li
s=[1,2,3]
t=['begin',s,'end']
t
t[1][1]
len(s)
max(s)
min(s)
list(s)
li = 'abcdefghijklmno'
li.count('f')
k = ['abc','def','ghijklmno']
k.append('def')
k
fruits=['apple','banana','cherry']
cars=['ford','bmw']
fruits.extend(cars)
cars
fruits=['apple','banana','cherry']
fruits.remove('apple')
fruits
tu=(23,45,'abc')
tu[1]