-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path11_practiceConditionals.py
More file actions
79 lines (58 loc) · 1.96 KB
/
11_practiceConditionals.py
File metadata and controls
79 lines (58 loc) · 1.96 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
78
79
# Q1.Prac
# n1 = int(input("Enter the first number: "))
# n2 = int(input("Enter the second number: "))
# n3 = int(input("Enter the third number: "))
# n4 = int(input("Enter the fourth number: "))
# if(n1>n2 and n1>n3 and n1>n4):
# print("First element is the greatest")
# elif(n2>n1 and n2>n3 and n2>n4):
# print("Second element is the greatest")
# elif(n3>n2 and n3>n1 and n3>n4):
# print("Third element is the greatest")
# else:
# print("Fourth element is the greatest")
# Q2.prac
# marks1 = int(input("Enter the marks in science: "))
# marks2 = int(input("Enter the marks in maths: "))
# marks3 = int(input("Enter the marks in history: "))
# average = (marks1+marks2+marks3)/3
# if(average > 40 and marks1 > 33 and marks2 > 33 and marks3 > 33):
# print("Passed")
# else:
# print("Fail")
# Q3. prac
# a = str(input("Enter a message: "))
# if(a == "Make a lot of money" or a == "buy now" or a=="subscribe this" or a == "click this"):
# print("spam text detected !!! ")
# else:
# print("One Unread Message.")
# Q4. prac
# a = str(input("Enter your username: "))
# length = (len(a))
# if(length <= 10):
# print("Is a username with characters less than 10")
# else:
# print("Is a username with characters greater than 10")
# Q5. prac
# a = ["Sohan","Mohan","Rohan","Valtryx","Rishav","Beyblade","Ray","Kage"]
# n = str(input("Enter your name: "))
# if(n == a[0] or n == a[1] or n == a[2] or n == a[3] or n == a[4] or n == a[5] or n == a[6] or n == a[7]):
# print("You're in the list")
# else:
# print("You're not in the list")
# Q6. prac
# a = int(input("Enter your number: "))
# if(a>=90 and a<=100):
# print("Excellent")
# elif(a>=80 and a<=90):
# print("A+")
# elif(a>=70 and a<=80):
# print("A")
# elif(a>=65 and a<=70):
# print("B+")
# elif(a>=50 and a<=65):
# print("B")
# elif(a>=40 and a<=50):
# print("C")
# else:
# print("Fail")