Skip to content

Commit 8d39111

Browse files
prithvi2000nivethaakm99
authored andcommitted
Prithvi Raj M V - 2nd Year CSE C 180501167 (#144)
* Prithvi Raj M V - 2nd Year CSE C 180501167 * Prithvi Raj M V - 2nd Year CSE C 180501167
1 parent 8b7db53 commit 8d39111

File tree

3 files changed

+37
-0
lines changed

3 files changed

+37
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
lst=[]
2+
n=int(input("Enter the number of students :"))
3+
for i in range(n):
4+
name=input("Enter name")
5+
lst.append(name)
6+
print(lst)
7+
for i in lst:
8+
if i.endswith('P'):
9+
print(i.split("-")[0])
10+
if i.endswith('p'):
11+
print(i.split("-")[0])
12+
13+
14+
15+
16+
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
tstr=input("Enter the string")
2+
freq={}
3+
for i in tstr:
4+
if i in freq:
5+
freq[i] +=1
6+
else:
7+
freq[i] =1
8+
print("occurances\n"+str(freq))
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
amount=int(input("Enter the amount robbed ny thief"))
2+
if amount<5000:
3+
print("Profit is Loss")
4+
elif amount==20000:
5+
print("Profit is Good")
6+
elif amount>5000:
7+
if amount<19999:
8+
print("Profit is Moderate")
9+
10+
11+
12+
13+

0 commit comments

Comments
 (0)