-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Vijay Natraj K - 2nd Year CSE C 180501170 (#175)
* Vijay08Natraj07: CS C 180501170 * Vijay08Natraj07 CS C 180501170
- Loading branch information
1 parent
8d39111
commit 506e767
Showing
4 changed files
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
print("Hello_World") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
lst=[] | ||
n=int(input("Enter the number of students :")) | ||
for i in range(n): | ||
name=input("Enter name") | ||
lst.append(name) | ||
print(lst) | ||
for i in lst: | ||
if i.endswith('P'): | ||
print(i.split("-")[0]) | ||
if i.endswith('p'): | ||
print(i.split("-")[0]) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
tstr=input("Enter the string") | ||
freq={} | ||
for i in tstr: | ||
if i in freq: | ||
freq[i] +=1 | ||
else: | ||
freq[i] =1 | ||
print("occurances\n"+str(freq)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
amount=int(input("Enter the amount robbed ny thief")) | ||
if amount<5000: | ||
print("Profit is Loss") | ||
elif amount==20000: | ||
print("Profit is Good") | ||
elif amount>5000: | ||
if amount<19999: | ||
print("Profit is Moderate") |