Skip to content
Merged
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
15 changes: 15 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,17 @@
.idea
*.pyc
string=sorted(input())
lower=""
even=""
odd=""
upper=""
for i in string:
if i.islower():
lower+=i
elif i.isupper():
upper+=i
elif int(i)%2==0:
even+=i
else:
odd+=i
print(lower+upper+odd+even)
6 changes: 2 additions & 4 deletions Counting-sort.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
#python program for counting sort (updated)
n=int(input("please give the number of elements\n"))
tlist = list()
print("okey now plase give the elemets")
for i in range(n):
tlist.append(int(input("\n")))
print("okey now plase enter n numbers seperated by spaces")
tlist=list(map(int,input().split()))
k = max(tlist)
n = len(tlist)

Expand Down
6 changes: 6 additions & 0 deletions Print_List_of_Even_Numbers.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# Very sort method to creat list of even number form a given list
#Advance-Python
list_number=list(map(int,input().split()))
even_list=[i for i in list_number if i%2==0]
print(even_list)
exit()# Another one
n = int(input("Enter the required range : ")) # user input
list = []

Expand Down
11 changes: 11 additions & 0 deletions Print_List_of_Odd_Numbers.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
master
#Another best method to do this

n=map(list(int,input().split()))
odd_list=list(i for i in n if i%2!=0)
print(odd_list)
exit()

# CALCULATE NUMBER OF ODD NUMBERS

# CALCULATE NUMBER OF ODD NUMBERS WITHIN A GIVEN LIMIT
master

n = int(input("Enter the limit : ")) # user input

Expand Down