Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions Assignment 2/180501014/attendanceStudents.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
l=[]
x=int(input("Enter no of student"))
print("Enter your string")
for i in range(0,x):
a=str(input())
l.append(a)
print("The student present were:")
for j in l:
z="P" in j
if(z):
print(j[0:-2],end=" ")
10 changes: 10 additions & 0 deletions Assignment 2/180501014/occurances.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
x=str(input("Enter the string"))
a={}
for i in x:
if i in a:
a[i]+=1
else:
a[i]=1
print("Occurances")
for j,y in a.items():
print(j,y)
7 changes: 7 additions & 0 deletions Assignment 2/180501014/robberthief.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
x=int(input("Enter the amount robbed by the thief"))
if x<5000:
print("loss")
if x>19999:
print("good")
if x>4999 and x<20000:
print("Moderate")
11 changes: 0 additions & 11 deletions attendanceStudents.py

This file was deleted.