Skip to content

Commit cfd2779

Browse files
authored
* Spam Detector * Pass_Fail Checker
1 parent 571e12d commit cfd2779

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

PassFail-rakshit1104.py

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
sub1 = int(input("Enter your marks in Subject_1 - "))
2+
sub2 = int(input("Enter your marks in Subject_2 - "))
3+
sub3 = int(input("Enter your marks in Subject_3 - "))
4+
5+
subTotal = sub1 + sub2 + sub3
6+
7+
if subTotal < 120 :
8+
print("You Failed because your aggregate is less than 40%")
9+
elif sub1 or sub2 or sub3 <33:
10+
print("You Failed because your subject wise score is less than 33%")
11+
else :
12+
print("Congratulations!! You Passed the exam")

spamdetector-rakshit1104.py

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
a = input("Enter a sentence - ")
2+
3+
if "make a lot of money" in a:
4+
spam = True
5+
elif "buy now" in a:
6+
spam = True
7+
elif "subscribe this" in a:
8+
spam = True
9+
elif "click this" in a:
10+
spam = True
11+
else:
12+
spam = False
13+
14+
if(spam):
15+
print("This message is a spam. Please don't proceed before verifying it.")
16+
else:
17+
print("This text is not a spam.")

0 commit comments

Comments
 (0)