File tree Expand file tree Collapse file tree 4 files changed +30
-0
lines changed Expand file tree Collapse file tree 4 files changed +30
-0
lines changed Original file line number Diff line number Diff line change 1+ print ("Hello_World" )
2+
Original file line number Diff line number Diff line change 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+
Original file line number Diff line number Diff line change 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 ))
Original file line number Diff line number Diff line change 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" )
You can’t perform that action at this time.
0 commit comments