Comments (2)
okk bro
from nptel-the-joy-of-computing-using-python.
I have done it
al = "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"
al = al.split(" ")
def get_index(ch):
for i in range(len(al)):
if ch == al[i]:
return i
def get_cj(ch):
return al[(get_index(ch) + 5) % 26]
def get_cifar(st):
st = [get_cj(i) for i in st]
return ''.join(st)
def get_counted_letter(wo):
data = {}
for ch in wo:
if ch in data.keys():
data[ch] += 1
else:
data[ch] = 1
return data
def check_cifar(wr, ci):
cdata = get_counted_letter(get_cifar(wr))
gcdata = get_counted_letter(ci)
cdata_keys = cdata.keys()
gcdata_keys = gcdata.keys()
for i in cdata_keys:
if i not in gcdata_keys:
return False
if cdata[i] != gcdata[i]:
return False
return True
wr = input()
ci = input()
if (check_cifar(wr, ci)):
print("Yes", end="")
else:
print("No", end="")
from nptel-the-joy-of-computing-using-python.
Related Issues (11)
- Thank you very much for all the effort you are doing! HOT 3
- Incorrect MCQs HOT 3
- Update Week-8 quiz
- Post the programming exam's solutions ASAP 😅 HOT 1
- week 4 Q9 HOT 1
- JOC previous years weekly quizes
- No programming questions? HOT 1
- Dynamic Week Preview HOT 2
- Previous Year Question Papers HOT 2
- A favour. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nptel-the-joy-of-computing-using-python.