Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create SUBRAT_DAY7.py #122

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
43 changes: 43 additions & 0 deletions SUBRAT_DAY7.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#SUBRAT PANDEY
#subratpandey100@gmail.com



value = input("Enter the value to be checked :- ")
l = len(value)
alphabet = ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]
check= []
final = []
if l<=100 and l>=2:
for i in range(l):
check.append(value[i])


for x in range(26):
if alphabet[x] == check[0]:
x = int(x)
break
else:
None
for y in range(26):
if alphabet[y] == check[-1]:
y = int(y)
break
else:
None

for k in range(x,(y+1)):
final.append(alphabet[k])

def Diff(final, check):
difference = [m for m in final + check if m not in final or m not in check]
return difference

output = Diff(final, check)
if len(output)>0:
for o in range(len(output)):
print(output[o], end=", ")
else:
print(None)
else:
print("Entered value is out of range")