SlideShare a Scribd company logo
1 of 1
Please do both parts in Python and print the output. Thank you.
Problem 3. You are given the following text. In [ ]: M text = "It was dark, like the bottom of a
well. There was a pattern of skulls and bones around I the frame, for the sake of appearances;
Death could not look himself in the skull in a mirror I with cherubs and roses around it. The
Death of Rats climbed the frame in a scrabble of claws and looked at Death expectantly from the
top. Quoth fluttered over and pecked briefly at his own reflection, on the basis that anything was
worth a try. Show me, said Death, show me my thoughts. A chessboard appeared, but it was
triangular, and so big that only the nearest point could be seen. Right on this point was the world
- turtle, elephants, the little orbiting sun and all. It was the I Discworld, which existed only just
this side of total improbability and, therefore, in border country. I In border country the border
gets crossed, and sometimes things creep into the universe that have I rather more on their mind
than a better life for their children and a wonderful future in the fruit picking and domestic
service industries. On every other black or white triangle of the chessboard, all the way to
infinity, was a small grey shape, rather like an empty hooded robe." You are also given a string
that contains all symbols of English alphabet. In [3]: M alphabet =
"abcdefghijklmnopqrstuvwxyz" Part 1. Write some code that generates the list unique_words,
containing all and only the unique lowercase words from text. You should see the following
output (the order can differl): ['a', 'infinity', 'reflection', 'with', 'like', 'big', 'briefly', 'into',
'children', 'which', 'fruit', 'picking', 'ther e', 'try', 'little', 'around', 'appearances', 'appeared', 'all',
'crossed', 'basis', 'improbability', 'their', 'discworl d', 'black', 'to', 'death', 'future', 'only', 'my', 'robe',
'things', 'for', 'it', 'existed', 'said', 'sake', 'sometime s', 'right', 'way', 'that', 'country', 'chessboard',
'quoth', 'well', 'domestic', 'skull', 'wonderful', 'hooded', 'or', 'empty', 'bottom', 'mirror', 'himself',
'rather', 'over', 'every', 'triangle', 'roses', 'border', 'orbiting', 'Was', 'fr om', 'show', 'be', 'pecked',
'bones', 'just', 'universe', 'me', 'triangular', 'gets', 'worth', 'have', 'climbed', 'servi ce', 'fluttered',
'top', 'but', 'grey', 'claws', 'at', 'rats', 'creep', 'own', 'pattern', 'point', 'white', 'than', 'dar k', 'therefore',
'frame', 'this', 'not', 'the', 'could', 'mind', 'turtle', 'scrabble', 'better', 'industries', 'looked', 'an',
'cherubs', 'life', 'anything', 'more', 'small', 'and', 'of', 'his', 'on', 'sku1ls', 'elephants', 'in', 'thoughts',
'seen', 'nearest', 'expectantly', 'other', 'side', 'shape', 'total', 'so', 'world', 'look', 'sun'] In [ ]: M Part
2. Write a program which generates the list bigrams, collect all attested bigrams in Ignore words
that are shorter than 2 characters. Make sure that the list bigrams does not contain duplicates.
Hint. You can use the code to extract bigrams you wrote above. Then, you need to have that code
iterate over each word in the list and add a check for duplicates! In [ ]: M

More Related Content

More from AustinaGRPaigey

PLEASE HELP!! Which are affiliate of audit client Port Co A and which.docx
PLEASE HELP!! Which are affiliate of audit client Port Co A and which.docxPLEASE HELP!! Which are affiliate of audit client Port Co A and which.docx
PLEASE HELP!! Which are affiliate of audit client Port Co A and which.docxAustinaGRPaigey
 
Please Help!!! Stave Prinen and Chelsy Parnard formed a partaneship- d.docx
Please Help!!! Stave Prinen and Chelsy Parnard formed a partaneship- d.docxPlease Help!!! Stave Prinen and Chelsy Parnard formed a partaneship- d.docx
Please Help!!! Stave Prinen and Chelsy Parnard formed a partaneship- d.docxAustinaGRPaigey
 
Please help with these questions Arterial Dissection (tear)- may be.docx
Please help with these  questions  Arterial Dissection (tear)- may be.docxPlease help with these  questions  Arterial Dissection (tear)- may be.docx
Please help with these questions Arterial Dissection (tear)- may be.docxAustinaGRPaigey
 
Please help with this question On June 13- the board of directors of S.docx
Please help with this question On June 13- the board of directors of S.docxPlease help with this question On June 13- the board of directors of S.docx
Please help with this question On June 13- the board of directors of S.docxAustinaGRPaigey
 
Please help me create a jME 3D scene uses a root node- multiple child.docx
Please help me create a jME 3D scene uses a root node- multiple child.docxPlease help me create a jME 3D scene uses a root node- multiple child.docx
Please help me create a jME 3D scene uses a root node- multiple child.docxAustinaGRPaigey
 
please help What is the name of the Standard Lead configuration used.docx
please help  What is the name of the Standard Lead configuration used.docxplease help  What is the name of the Standard Lead configuration used.docx
please help What is the name of the Standard Lead configuration used.docxAustinaGRPaigey
 
please answer both! Q2- The graph below shows one 12-hour spring tide.docx
please answer both! Q2- The graph below shows one 12-hour spring tide.docxplease answer both! Q2- The graph below shows one 12-hour spring tide.docx
please answer both! Q2- The graph below shows one 12-hour spring tide.docxAustinaGRPaigey
 
please explain as well 2- Let X1 and X2 be random variables (not neces.docx
please explain as well 2- Let X1 and X2 be random variables (not neces.docxplease explain as well 2- Let X1 and X2 be random variables (not neces.docx
please explain as well 2- Let X1 and X2 be random variables (not neces.docxAustinaGRPaigey
 
please code in c#- please note that im a complete beginner- northwind.docx
please code in c#- please note that im a complete beginner-  northwind.docxplease code in c#- please note that im a complete beginner-  northwind.docx
please code in c#- please note that im a complete beginner- northwind.docxAustinaGRPaigey
 
Please check the accuracy of these questions- Loss of function alleles.docx
Please check the accuracy of these questions- Loss of function alleles.docxPlease check the accuracy of these questions- Loss of function alleles.docx
Please check the accuracy of these questions- Loss of function alleles.docxAustinaGRPaigey
 
Please assist me with a drawing of the following- Draw a side-by-side.docx
Please assist me with a drawing of the following-  Draw a side-by-side.docxPlease assist me with a drawing of the following-  Draw a side-by-side.docx
Please assist me with a drawing of the following- Draw a side-by-side.docxAustinaGRPaigey
 
Please assist with 5-10- This planet is -5544 AU from the sun- 5- Comp.docx
Please assist with 5-10- This planet is -5544 AU from the sun- 5- Comp.docxPlease assist with 5-10- This planet is -5544 AU from the sun- 5- Comp.docx
Please assist with 5-10- This planet is -5544 AU from the sun- 5- Comp.docxAustinaGRPaigey
 
Please answer the following in 1-2 paragraphs- 1- Why are some countri.docx
Please answer the following in 1-2 paragraphs- 1- Why are some countri.docxPlease answer the following in 1-2 paragraphs- 1- Why are some countri.docx
Please answer the following in 1-2 paragraphs- 1- Why are some countri.docxAustinaGRPaigey
 
Please answer the blank spaces Ine Retina The retina has 2 classes o.docx
Please answer the blank spaces   Ine Retina The retina has 2 classes o.docxPlease answer the blank spaces   Ine Retina The retina has 2 classes o.docx
Please answer the blank spaces Ine Retina The retina has 2 classes o.docxAustinaGRPaigey
 
please answer all questions to the activites- The study of genetics an.docx
please answer all questions to the activites- The study of genetics an.docxplease answer all questions to the activites- The study of genetics an.docx
please answer all questions to the activites- The study of genetics an.docxAustinaGRPaigey
 
Please add in depth explanation (HARD) Suppose you repeated the Bernar.docx
Please add in depth explanation (HARD) Suppose you repeated the Bernar.docxPlease add in depth explanation (HARD) Suppose you repeated the Bernar.docx
Please add in depth explanation (HARD) Suppose you repeated the Bernar.docxAustinaGRPaigey
 
PICTURE INCLUDED What is the probability of the following- (a) An eve.docx
PICTURE INCLUDED  What is the probability of the following- (a) An eve.docxPICTURE INCLUDED  What is the probability of the following- (a) An eve.docx
PICTURE INCLUDED What is the probability of the following- (a) An eve.docxAustinaGRPaigey
 
Planned brand-company messages should- A- Create brand awareness B- Ch.docx
Planned brand-company messages should- A- Create brand awareness B- Ch.docxPlanned brand-company messages should- A- Create brand awareness B- Ch.docx
Planned brand-company messages should- A- Create brand awareness B- Ch.docxAustinaGRPaigey
 
Peter is a design engineer at a mobile device manufacturing company- H.docx
Peter is a design engineer at a mobile device manufacturing company- H.docxPeter is a design engineer at a mobile device manufacturing company- H.docx
Peter is a design engineer at a mobile device manufacturing company- H.docxAustinaGRPaigey
 

More from AustinaGRPaigey (20)

PLEASE HELP!! Which are affiliate of audit client Port Co A and which.docx
PLEASE HELP!! Which are affiliate of audit client Port Co A and which.docxPLEASE HELP!! Which are affiliate of audit client Port Co A and which.docx
PLEASE HELP!! Which are affiliate of audit client Port Co A and which.docx
 
Please Help!!! Stave Prinen and Chelsy Parnard formed a partaneship- d.docx
Please Help!!! Stave Prinen and Chelsy Parnard formed a partaneship- d.docxPlease Help!!! Stave Prinen and Chelsy Parnard formed a partaneship- d.docx
Please Help!!! Stave Prinen and Chelsy Parnard formed a partaneship- d.docx
 
Please help with these questions Arterial Dissection (tear)- may be.docx
Please help with these  questions  Arterial Dissection (tear)- may be.docxPlease help with these  questions  Arterial Dissection (tear)- may be.docx
Please help with these questions Arterial Dissection (tear)- may be.docx
 
Please help with this question On June 13- the board of directors of S.docx
Please help with this question On June 13- the board of directors of S.docxPlease help with this question On June 13- the board of directors of S.docx
Please help with this question On June 13- the board of directors of S.docx
 
Please help me create a jME 3D scene uses a root node- multiple child.docx
Please help me create a jME 3D scene uses a root node- multiple child.docxPlease help me create a jME 3D scene uses a root node- multiple child.docx
Please help me create a jME 3D scene uses a root node- multiple child.docx
 
please help What is the name of the Standard Lead configuration used.docx
please help  What is the name of the Standard Lead configuration used.docxplease help  What is the name of the Standard Lead configuration used.docx
please help What is the name of the Standard Lead configuration used.docx
 
please answer both! Q2- The graph below shows one 12-hour spring tide.docx
please answer both! Q2- The graph below shows one 12-hour spring tide.docxplease answer both! Q2- The graph below shows one 12-hour spring tide.docx
please answer both! Q2- The graph below shows one 12-hour spring tide.docx
 
please explain as well 2- Let X1 and X2 be random variables (not neces.docx
please explain as well 2- Let X1 and X2 be random variables (not neces.docxplease explain as well 2- Let X1 and X2 be random variables (not neces.docx
please explain as well 2- Let X1 and X2 be random variables (not neces.docx
 
please code in c#- please note that im a complete beginner- northwind.docx
please code in c#- please note that im a complete beginner-  northwind.docxplease code in c#- please note that im a complete beginner-  northwind.docx
please code in c#- please note that im a complete beginner- northwind.docx
 
Please check the accuracy of these questions- Loss of function alleles.docx
Please check the accuracy of these questions- Loss of function alleles.docxPlease check the accuracy of these questions- Loss of function alleles.docx
Please check the accuracy of these questions- Loss of function alleles.docx
 
Please assist me with a drawing of the following- Draw a side-by-side.docx
Please assist me with a drawing of the following-  Draw a side-by-side.docxPlease assist me with a drawing of the following-  Draw a side-by-side.docx
Please assist me with a drawing of the following- Draw a side-by-side.docx
 
Please assist with 5-10- This planet is -5544 AU from the sun- 5- Comp.docx
Please assist with 5-10- This planet is -5544 AU from the sun- 5- Comp.docxPlease assist with 5-10- This planet is -5544 AU from the sun- 5- Comp.docx
Please assist with 5-10- This planet is -5544 AU from the sun- 5- Comp.docx
 
Please answer the following in 1-2 paragraphs- 1- Why are some countri.docx
Please answer the following in 1-2 paragraphs- 1- Why are some countri.docxPlease answer the following in 1-2 paragraphs- 1- Why are some countri.docx
Please answer the following in 1-2 paragraphs- 1- Why are some countri.docx
 
Please answer the blank spaces Ine Retina The retina has 2 classes o.docx
Please answer the blank spaces   Ine Retina The retina has 2 classes o.docxPlease answer the blank spaces   Ine Retina The retina has 2 classes o.docx
Please answer the blank spaces Ine Retina The retina has 2 classes o.docx
 
please answer all questions to the activites- The study of genetics an.docx
please answer all questions to the activites- The study of genetics an.docxplease answer all questions to the activites- The study of genetics an.docx
please answer all questions to the activites- The study of genetics an.docx
 
Please add in depth explanation (HARD) Suppose you repeated the Bernar.docx
Please add in depth explanation (HARD) Suppose you repeated the Bernar.docxPlease add in depth explanation (HARD) Suppose you repeated the Bernar.docx
Please add in depth explanation (HARD) Suppose you repeated the Bernar.docx
 
PICTURE INCLUDED What is the probability of the following- (a) An eve.docx
PICTURE INCLUDED  What is the probability of the following- (a) An eve.docxPICTURE INCLUDED  What is the probability of the following- (a) An eve.docx
PICTURE INCLUDED What is the probability of the following- (a) An eve.docx
 
Planned brand-company messages should- A- Create brand awareness B- Ch.docx
Planned brand-company messages should- A- Create brand awareness B- Ch.docxPlanned brand-company messages should- A- Create brand awareness B- Ch.docx
Planned brand-company messages should- A- Create brand awareness B- Ch.docx
 
PHP-23(H).docx
PHP-23(H).docxPHP-23(H).docx
PHP-23(H).docx
 
Peter is a design engineer at a mobile device manufacturing company- H.docx
Peter is a design engineer at a mobile device manufacturing company- H.docxPeter is a design engineer at a mobile device manufacturing company- H.docx
Peter is a design engineer at a mobile device manufacturing company- H.docx
 

Recently uploaded

TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...Nguyen Thanh Tu Collection
 
Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...EduSkills OECD
 
PSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptxPSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptxMarlene Maheu
 
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...EADTU
 
male presentation...pdf.................
male presentation...pdf.................male presentation...pdf.................
male presentation...pdf.................MirzaAbrarBaig5
 
How to Manage Website in Odoo 17 Studio App.pptx
How to Manage Website in Odoo 17 Studio App.pptxHow to Manage Website in Odoo 17 Studio App.pptx
How to Manage Website in Odoo 17 Studio App.pptxCeline George
 
Observing-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptxObserving-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptxAdelaideRefugio
 
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...Nguyen Thanh Tu Collection
 
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文中 央社
 
MOOD STABLIZERS DRUGS.pptx
MOOD     STABLIZERS           DRUGS.pptxMOOD     STABLIZERS           DRUGS.pptx
MOOD STABLIZERS DRUGS.pptxPoojaSen20
 
Basic Civil Engineering notes on Transportation Engineering & Modes of Transport
Basic Civil Engineering notes on Transportation Engineering & Modes of TransportBasic Civil Engineering notes on Transportation Engineering & Modes of Transport
Basic Civil Engineering notes on Transportation Engineering & Modes of TransportDenish Jangid
 
How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17Celine George
 
Major project report on Tata Motors and its marketing strategies
Major project report on Tata Motors and its marketing strategiesMajor project report on Tata Motors and its marketing strategies
Major project report on Tata Motors and its marketing strategiesAmanpreetKaur157993
 
UChicago CMSC 23320 - The Best Commit Messages of 2024
UChicago CMSC 23320 - The Best Commit Messages of 2024UChicago CMSC 23320 - The Best Commit Messages of 2024
UChicago CMSC 23320 - The Best Commit Messages of 2024Borja Sotomayor
 
Improved Approval Flow in Odoo 17 Studio App
Improved Approval Flow in Odoo 17 Studio AppImproved Approval Flow in Odoo 17 Studio App
Improved Approval Flow in Odoo 17 Studio AppCeline George
 
Scopus Indexed Journals 2024 - ISCOPUS Publications
Scopus Indexed Journals 2024 - ISCOPUS PublicationsScopus Indexed Journals 2024 - ISCOPUS Publications
Scopus Indexed Journals 2024 - ISCOPUS PublicationsISCOPE Publication
 
An overview of the various scriptures in Hinduism
An overview of the various scriptures in HinduismAn overview of the various scriptures in Hinduism
An overview of the various scriptures in HinduismDabee Kamal
 
Spring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community PartnershipsSpring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community Partnershipsexpandedwebsite
 

Recently uploaded (20)

TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
 
Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...
 
PSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptxPSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptx
 
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
 
male presentation...pdf.................
male presentation...pdf.................male presentation...pdf.................
male presentation...pdf.................
 
How to Manage Website in Odoo 17 Studio App.pptx
How to Manage Website in Odoo 17 Studio App.pptxHow to Manage Website in Odoo 17 Studio App.pptx
How to Manage Website in Odoo 17 Studio App.pptx
 
Observing-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptxObserving-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptx
 
OS-operating systems- ch05 (CPU Scheduling) ...
OS-operating systems- ch05 (CPU Scheduling) ...OS-operating systems- ch05 (CPU Scheduling) ...
OS-operating systems- ch05 (CPU Scheduling) ...
 
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
 
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
 
MOOD STABLIZERS DRUGS.pptx
MOOD     STABLIZERS           DRUGS.pptxMOOD     STABLIZERS           DRUGS.pptx
MOOD STABLIZERS DRUGS.pptx
 
Basic Civil Engineering notes on Transportation Engineering & Modes of Transport
Basic Civil Engineering notes on Transportation Engineering & Modes of TransportBasic Civil Engineering notes on Transportation Engineering & Modes of Transport
Basic Civil Engineering notes on Transportation Engineering & Modes of Transport
 
Supporting Newcomer Multilingual Learners
Supporting Newcomer  Multilingual LearnersSupporting Newcomer  Multilingual Learners
Supporting Newcomer Multilingual Learners
 
How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17
 
Major project report on Tata Motors and its marketing strategies
Major project report on Tata Motors and its marketing strategiesMajor project report on Tata Motors and its marketing strategies
Major project report on Tata Motors and its marketing strategies
 
UChicago CMSC 23320 - The Best Commit Messages of 2024
UChicago CMSC 23320 - The Best Commit Messages of 2024UChicago CMSC 23320 - The Best Commit Messages of 2024
UChicago CMSC 23320 - The Best Commit Messages of 2024
 
Improved Approval Flow in Odoo 17 Studio App
Improved Approval Flow in Odoo 17 Studio AppImproved Approval Flow in Odoo 17 Studio App
Improved Approval Flow in Odoo 17 Studio App
 
Scopus Indexed Journals 2024 - ISCOPUS Publications
Scopus Indexed Journals 2024 - ISCOPUS PublicationsScopus Indexed Journals 2024 - ISCOPUS Publications
Scopus Indexed Journals 2024 - ISCOPUS Publications
 
An overview of the various scriptures in Hinduism
An overview of the various scriptures in HinduismAn overview of the various scriptures in Hinduism
An overview of the various scriptures in Hinduism
 
Spring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community PartnershipsSpring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community Partnerships
 

Please do both parts in Python and print the output- Thank you- Proble.docx

  • 1. Please do both parts in Python and print the output. Thank you. Problem 3. You are given the following text. In [ ]: M text = "It was dark, like the bottom of a well. There was a pattern of skulls and bones around I the frame, for the sake of appearances; Death could not look himself in the skull in a mirror I with cherubs and roses around it. The Death of Rats climbed the frame in a scrabble of claws and looked at Death expectantly from the top. Quoth fluttered over and pecked briefly at his own reflection, on the basis that anything was worth a try. Show me, said Death, show me my thoughts. A chessboard appeared, but it was triangular, and so big that only the nearest point could be seen. Right on this point was the world - turtle, elephants, the little orbiting sun and all. It was the I Discworld, which existed only just this side of total improbability and, therefore, in border country. I In border country the border gets crossed, and sometimes things creep into the universe that have I rather more on their mind than a better life for their children and a wonderful future in the fruit picking and domestic service industries. On every other black or white triangle of the chessboard, all the way to infinity, was a small grey shape, rather like an empty hooded robe." You are also given a string that contains all symbols of English alphabet. In [3]: M alphabet = "abcdefghijklmnopqrstuvwxyz" Part 1. Write some code that generates the list unique_words, containing all and only the unique lowercase words from text. You should see the following output (the order can differl): ['a', 'infinity', 'reflection', 'with', 'like', 'big', 'briefly', 'into', 'children', 'which', 'fruit', 'picking', 'ther e', 'try', 'little', 'around', 'appearances', 'appeared', 'all', 'crossed', 'basis', 'improbability', 'their', 'discworl d', 'black', 'to', 'death', 'future', 'only', 'my', 'robe', 'things', 'for', 'it', 'existed', 'said', 'sake', 'sometime s', 'right', 'way', 'that', 'country', 'chessboard', 'quoth', 'well', 'domestic', 'skull', 'wonderful', 'hooded', 'or', 'empty', 'bottom', 'mirror', 'himself', 'rather', 'over', 'every', 'triangle', 'roses', 'border', 'orbiting', 'Was', 'fr om', 'show', 'be', 'pecked', 'bones', 'just', 'universe', 'me', 'triangular', 'gets', 'worth', 'have', 'climbed', 'servi ce', 'fluttered', 'top', 'but', 'grey', 'claws', 'at', 'rats', 'creep', 'own', 'pattern', 'point', 'white', 'than', 'dar k', 'therefore', 'frame', 'this', 'not', 'the', 'could', 'mind', 'turtle', 'scrabble', 'better', 'industries', 'looked', 'an', 'cherubs', 'life', 'anything', 'more', 'small', 'and', 'of', 'his', 'on', 'sku1ls', 'elephants', 'in', 'thoughts', 'seen', 'nearest', 'expectantly', 'other', 'side', 'shape', 'total', 'so', 'world', 'look', 'sun'] In [ ]: M Part 2. Write a program which generates the list bigrams, collect all attested bigrams in Ignore words that are shorter than 2 characters. Make sure that the list bigrams does not contain duplicates. Hint. You can use the code to extract bigrams you wrote above. Then, you need to have that code iterate over each word in the list and add a check for duplicates! In [ ]: M