#Program to find out whether a student is pass or fail,if it requires total 40% and at least 33%,in each subject to
pass.Assume 3 subject and take marks as an input from the user
sub1=int(input("Enter first subjrct marks \n"))
sub2=int(input("Enter second subjrct marks \n"))
sub3=int(input("Enter third subjrct marks \n"))
if(sub1<33 or sub2<33 or sub3<33):
print("You are fail marks is less then 33")
elif((sub1+sub2+sub3)/3 <40):
print("You are fail total is less then 40")
else:
print("You are pass :)")
#Program to find a spam comment is defined as a text containing following keywords : make a lot of money,buy now,
subscribe this,click this
comment =input("Enter the text \n")
if("make a lot of money" in comment):
spam = True
elif("buy now" in comment):
spam = True
elif("click this" in comment):
spam = True
elif("subscribe this" in comment):
spam = True
else:
spam= False
if(spam):
print("text have spam")
else:
print("No Spam")
#Program to find whether a given username contains less than 10 characters or not
username=input("Enter Username \n")
length=len(username)
if(length<10):
print("Length is less then 10")
else:
print("Length is more then 10")
#Program to find out whether a given name is present in a list or not
names=["Animesh","rohit","Vikas"]
name=input("Enter the name to check \n")
if (name in names):
print("Your name is present in the list")
else:
print("Your name is not present in the list")
#Program to calculate the grade of a student from his marks the following scheme:
90-100 -> Ex 80-90 -> A 70-80 ->B 60-70 ->C 50-60 -> D <50 ->F
marks = int(input("Enter total marks \n"))
if(marks>100 or marks<0):
print("Marks is Incorrect")
elif(marks<=100 and marks>=90):
print("Grade is Ex")
elif(marks<90 and marks>=80):
print("Grade is A")
elif(marks<80 and marks>=70):
print("Grade is B")
elif(marks<70 and marks>=60):
print("Grade is C")
elif(marks<60 and marks>=50):
print("Grade is D")
else:
print("Grade is F")
#Program to find out whether a given post is talking about "Animesh" or not
rawpost = input("enter post \n")
post=rawpost.lower()
if("animesh" in post):
print("Found")
else:
print("Not Found")