-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path27_practice_set_chptr6.py
More file actions
77 lines (58 loc) · 2.17 KB
/
27_practice_set_chptr6.py
File metadata and controls
77 lines (58 loc) · 2.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# wap to find greatest of 4 no. entered by user.
# num1=int(input("enter value of num1 "))
# num2=int(input("enter value of num2 "))
# num3=int(input("enter value of num3 "))
# num4=int(input("enter value of num4 "))
# if(num1>num4):
# f1=num1
# else:
# f1=num2
# if(num2>num3):
# f2=num2
# else:
# f2=num3
# if(f1>f2):
# print(f1," is the greatestv of all")
# else:
# print(f2," is the greatest os all ")
#wap to find whether a student is pass or fail,if it requires total 40% and atleast 33% in each subject to pass.assume 3 subject and take marks as input from the user
# maths=int(input("enter marks scored in maths "))
# eng=int(input("enter marks scored in english "))
# hindi=int(input("enter marks scored in hindi "))
# marks=int(maths+eng+hindi)/3
# if(marks<40):
# print("you scored less than 40% therefore you are FAIL")
# elif(maths<33 and hindi<33 and eng<33):
# print("your score is less than 33% ,in one of the subject therefore you are FAIL")
# if(marks>=40):
# pass
# if(maths>=33 and hindi>=33 and eng>=33):
# print("congratulation you are PASS!")
# else:
# print("you are FAIL")
# a spam mail is defined as the text containing following keywords:
# "make a lot of money","buy now","subscribe this","click this".wap to delete this spam
# mail=input("enter mail\n")
# if("make a lot of money" in mail):
# print("spam alert,delete this spam")
# elif("buy now" in mail):
# print("spam alert,delete this spam")
# elif("subscribe this"in mail):
# print("spam alert,delete this spam")
# elif("click this"in mail):
# print("spam alert,delete this spam")
# else:
# print("no spam msg found")
#wap to find whether a given username contains less than 10 characters or not.
# username=input("Enter your username:")
# if(len(username)>=10):
# print("Your username must not be more than 10 characters!")
# else:
# print(username)
#wap which finds out whether the name is present in the list or not
list=["vaish","tom",'jennie',"kim","jack"]
name=input("enter the name which you want to find:")
if(name in list):
print("yes,present")
else:
print("absent")