SlideShare a Scribd company logo
Astronomers were able to find a new planet in a far away solar system. They are calling this
planet Nova, for the presence of abundant dements from a supernova. The people of planet Nova
speak in a strange language. Thankfully, a scientist was able to decode their language to English.
He found that they also use the same letters as English, but they swap each pair of consecutive
alphabets in English. For example, they swap A with B and Y with Z. Create a function that
reads a word in Nova and translates it into English.
Solution
def nova(st):
st = list(st)
for i in range(0,len(st)):
if st[i] == 'z':
st[i] = 'a'
elif st[i] == 'Z':
st[i] = 'A'
else:
st[i] = chr(ord(st[i])+1)
return ''.join(str(i) for i in st)

More Related Content

More from manjan6

What is the difference between a hash in perl and a hashtable in Jav.pdf
What is the difference between a hash in perl and a hashtable in Jav.pdfWhat is the difference between a hash in perl and a hashtable in Jav.pdf
What is the difference between a hash in perl and a hashtable in Jav.pdf
manjan6
 
What are the specific linkages among immune surveillance, clonal sel.pdf
What are the specific linkages among immune surveillance, clonal sel.pdfWhat are the specific linkages among immune surveillance, clonal sel.pdf
What are the specific linkages among immune surveillance, clonal sel.pdf
manjan6
 
True or False –Paraeducators provide direct or indirect instructio.pdf
True or False –Paraeducators provide direct or indirect instructio.pdfTrue or False –Paraeducators provide direct or indirect instructio.pdf
True or False –Paraeducators provide direct or indirect instructio.pdf
manjan6
 
The situation where the few who yell the loudest get heard Is ref.pdf
The situation where the few who yell the loudest get heard Is ref.pdfThe situation where the few who yell the loudest get heard Is ref.pdf
The situation where the few who yell the loudest get heard Is ref.pdf
manjan6
 
Templated Binary Tree implementing function help I need to im.pdf
Templated Binary Tree implementing function help I need to im.pdfTemplated Binary Tree implementing function help I need to im.pdf
Templated Binary Tree implementing function help I need to im.pdf
manjan6
 
State if you agree or disagree with the question and comments made b.pdf
State if you agree or disagree with the question and comments made b.pdfState if you agree or disagree with the question and comments made b.pdf
State if you agree or disagree with the question and comments made b.pdf
manjan6
 
A number of benefits that one might expect to see from using a datab.pdf
A number of benefits that one might expect to see from using a datab.pdfA number of benefits that one might expect to see from using a datab.pdf
A number of benefits that one might expect to see from using a datab.pdf
manjan6
 
QUESTION If you look at the code, youll see that we keep two list.pdf
QUESTION If you look at the code, youll see that we keep two list.pdfQUESTION If you look at the code, youll see that we keep two list.pdf
QUESTION If you look at the code, youll see that we keep two list.pdf
manjan6
 
Question 11 What is the volume of 17.0 grams of carbon dioxide gas if.pdf
Question 11 What is the volume of 17.0 grams of carbon dioxide gas if.pdfQuestion 11 What is the volume of 17.0 grams of carbon dioxide gas if.pdf
Question 11 What is the volume of 17.0 grams of carbon dioxide gas if.pdf
manjan6
 
Please help with this. program must be written in C# .. All of the g.pdf
Please help with this. program must be written in C# .. All of the g.pdfPlease help with this. program must be written in C# .. All of the g.pdf
Please help with this. program must be written in C# .. All of the g.pdf
manjan6
 
Match the enzyme activity in DNA synthesis with its function. DNA po.pdf
Match the enzyme activity in DNA synthesis with its function.  DNA po.pdfMatch the enzyme activity in DNA synthesis with its function.  DNA po.pdf
Match the enzyme activity in DNA synthesis with its function. DNA po.pdf
manjan6
 
Introduction to Engineering ExperimentationSurface temperature con.pdf
Introduction to Engineering ExperimentationSurface temperature con.pdfIntroduction to Engineering ExperimentationSurface temperature con.pdf
Introduction to Engineering ExperimentationSurface temperature con.pdf
manjan6
 
In Java....The methods should work as add(Node) It has to take a .pdf
In Java....The methods should work as add(Node) It has to take a .pdfIn Java....The methods should work as add(Node) It has to take a .pdf
In Java....The methods should work as add(Node) It has to take a .pdf
manjan6
 
In class we implemented methods for removing and retrieving an arbit.pdf
In class we implemented methods for removing and retrieving an arbit.pdfIn class we implemented methods for removing and retrieving an arbit.pdf
In class we implemented methods for removing and retrieving an arbit.pdf
manjan6
 
In a 300-600 word statement, explain ONE of the following perspecti.pdf
In a 300-600 word statement, explain ONE of the following perspecti.pdfIn a 300-600 word statement, explain ONE of the following perspecti.pdf
In a 300-600 word statement, explain ONE of the following perspecti.pdf
manjan6
 
if the solubility of CaSO4 is 510^-3 molL what is the Ksp of CaSO4.pdf
if the solubility of CaSO4 is 510^-3 molL what is the Ksp of CaSO4.pdfif the solubility of CaSO4 is 510^-3 molL what is the Ksp of CaSO4.pdf
if the solubility of CaSO4 is 510^-3 molL what is the Ksp of CaSO4.pdf
manjan6
 
How long does it take for a randomly moving protein to travel the dis.pdf
How long does it take for a randomly moving protein to travel the dis.pdfHow long does it take for a randomly moving protein to travel the dis.pdf
How long does it take for a randomly moving protein to travel the dis.pdf
manjan6
 
How to create an array restaurant menu out of the main class using m.pdf
How to create an array restaurant menu out of the main class using m.pdfHow to create an array restaurant menu out of the main class using m.pdf
How to create an array restaurant menu out of the main class using m.pdf
manjan6
 
How does Zoning support human and environmental sustainable communit.pdf
How does Zoning support human and environmental sustainable communit.pdfHow does Zoning support human and environmental sustainable communit.pdf
How does Zoning support human and environmental sustainable communit.pdf
manjan6
 
First, create a class called Person that implements the Comparable i.pdf
First, create a class called Person that implements the Comparable i.pdfFirst, create a class called Person that implements the Comparable i.pdf
First, create a class called Person that implements the Comparable i.pdf
manjan6
 

More from manjan6 (20)

What is the difference between a hash in perl and a hashtable in Jav.pdf
What is the difference between a hash in perl and a hashtable in Jav.pdfWhat is the difference between a hash in perl and a hashtable in Jav.pdf
What is the difference between a hash in perl and a hashtable in Jav.pdf
 
What are the specific linkages among immune surveillance, clonal sel.pdf
What are the specific linkages among immune surveillance, clonal sel.pdfWhat are the specific linkages among immune surveillance, clonal sel.pdf
What are the specific linkages among immune surveillance, clonal sel.pdf
 
True or False –Paraeducators provide direct or indirect instructio.pdf
True or False –Paraeducators provide direct or indirect instructio.pdfTrue or False –Paraeducators provide direct or indirect instructio.pdf
True or False –Paraeducators provide direct or indirect instructio.pdf
 
The situation where the few who yell the loudest get heard Is ref.pdf
The situation where the few who yell the loudest get heard Is ref.pdfThe situation where the few who yell the loudest get heard Is ref.pdf
The situation where the few who yell the loudest get heard Is ref.pdf
 
Templated Binary Tree implementing function help I need to im.pdf
Templated Binary Tree implementing function help I need to im.pdfTemplated Binary Tree implementing function help I need to im.pdf
Templated Binary Tree implementing function help I need to im.pdf
 
State if you agree or disagree with the question and comments made b.pdf
State if you agree or disagree with the question and comments made b.pdfState if you agree or disagree with the question and comments made b.pdf
State if you agree or disagree with the question and comments made b.pdf
 
A number of benefits that one might expect to see from using a datab.pdf
A number of benefits that one might expect to see from using a datab.pdfA number of benefits that one might expect to see from using a datab.pdf
A number of benefits that one might expect to see from using a datab.pdf
 
QUESTION If you look at the code, youll see that we keep two list.pdf
QUESTION If you look at the code, youll see that we keep two list.pdfQUESTION If you look at the code, youll see that we keep two list.pdf
QUESTION If you look at the code, youll see that we keep two list.pdf
 
Question 11 What is the volume of 17.0 grams of carbon dioxide gas if.pdf
Question 11 What is the volume of 17.0 grams of carbon dioxide gas if.pdfQuestion 11 What is the volume of 17.0 grams of carbon dioxide gas if.pdf
Question 11 What is the volume of 17.0 grams of carbon dioxide gas if.pdf
 
Please help with this. program must be written in C# .. All of the g.pdf
Please help with this. program must be written in C# .. All of the g.pdfPlease help with this. program must be written in C# .. All of the g.pdf
Please help with this. program must be written in C# .. All of the g.pdf
 
Match the enzyme activity in DNA synthesis with its function. DNA po.pdf
Match the enzyme activity in DNA synthesis with its function.  DNA po.pdfMatch the enzyme activity in DNA synthesis with its function.  DNA po.pdf
Match the enzyme activity in DNA synthesis with its function. DNA po.pdf
 
Introduction to Engineering ExperimentationSurface temperature con.pdf
Introduction to Engineering ExperimentationSurface temperature con.pdfIntroduction to Engineering ExperimentationSurface temperature con.pdf
Introduction to Engineering ExperimentationSurface temperature con.pdf
 
In Java....The methods should work as add(Node) It has to take a .pdf
In Java....The methods should work as add(Node) It has to take a .pdfIn Java....The methods should work as add(Node) It has to take a .pdf
In Java....The methods should work as add(Node) It has to take a .pdf
 
In class we implemented methods for removing and retrieving an arbit.pdf
In class we implemented methods for removing and retrieving an arbit.pdfIn class we implemented methods for removing and retrieving an arbit.pdf
In class we implemented methods for removing and retrieving an arbit.pdf
 
In a 300-600 word statement, explain ONE of the following perspecti.pdf
In a 300-600 word statement, explain ONE of the following perspecti.pdfIn a 300-600 word statement, explain ONE of the following perspecti.pdf
In a 300-600 word statement, explain ONE of the following perspecti.pdf
 
if the solubility of CaSO4 is 510^-3 molL what is the Ksp of CaSO4.pdf
if the solubility of CaSO4 is 510^-3 molL what is the Ksp of CaSO4.pdfif the solubility of CaSO4 is 510^-3 molL what is the Ksp of CaSO4.pdf
if the solubility of CaSO4 is 510^-3 molL what is the Ksp of CaSO4.pdf
 
How long does it take for a randomly moving protein to travel the dis.pdf
How long does it take for a randomly moving protein to travel the dis.pdfHow long does it take for a randomly moving protein to travel the dis.pdf
How long does it take for a randomly moving protein to travel the dis.pdf
 
How to create an array restaurant menu out of the main class using m.pdf
How to create an array restaurant menu out of the main class using m.pdfHow to create an array restaurant menu out of the main class using m.pdf
How to create an array restaurant menu out of the main class using m.pdf
 
How does Zoning support human and environmental sustainable communit.pdf
How does Zoning support human and environmental sustainable communit.pdfHow does Zoning support human and environmental sustainable communit.pdf
How does Zoning support human and environmental sustainable communit.pdf
 
First, create a class called Person that implements the Comparable i.pdf
First, create a class called Person that implements the Comparable i.pdfFirst, create a class called Person that implements the Comparable i.pdf
First, create a class called Person that implements the Comparable i.pdf
 

Recently uploaded

Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
Jheel Barad
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
vaibhavrinwa19
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
JosvitaDsouza2
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
joachimlavalley1
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
DhatriParmar
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
Jisc
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
SACHIN R KONDAGURI
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
beazzy04
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
RaedMohamed3
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
Celine George
 
678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf
CarlosHernanMontoyab2
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
Vikramjit Singh
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Atul Kumar Singh
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 

Recently uploaded (20)

Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
 
678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 

Astronomers were able to find a new planet in a far away solar system.pdf

  • 1. Astronomers were able to find a new planet in a far away solar system. They are calling this planet Nova, for the presence of abundant dements from a supernova. The people of planet Nova speak in a strange language. Thankfully, a scientist was able to decode their language to English. He found that they also use the same letters as English, but they swap each pair of consecutive alphabets in English. For example, they swap A with B and Y with Z. Create a function that reads a word in Nova and translates it into English. Solution def nova(st): st = list(st) for i in range(0,len(st)): if st[i] == 'z': st[i] = 'a' elif st[i] == 'Z': st[i] = 'A' else: st[i] = chr(ord(st[i])+1) return ''.join(str(i) for i in st)