SlideShare ist ein Scribd-Unternehmen logo
1 von 1
Using Python Program.We define the letters 'a', 'e', 'i', 'o' and 'u' as vowels. We do not
consider any other letter as a vowel. Write a function named mostlyVowels() that returns a list of
words in a body of text in which more than half the letters are vowels. Count both capitalized
and lower case instances of the vowels. A word should appear in the return list at most once, no
matter how many times it occurs in the input string. A capitalized instance of a word is the same
word as a lower cased instance . For example, 'Is' and 'is' are the same word. Input: a string s
that consist s of words, separated by spaces Return:a list of all words in the input string in which
more than half the letters are vowels For example, the following would be correct output: >>>
mlk = 'Our lives begin to end the day we become silent about things that matter' >>>
print(mostlyVowels(mlk)) ['our', 'about']
Solution
Hope this will help you!!!

Weitere ähnliche Inhalte

Ähnlich wie Using Python Program-We define the letters -'a-'- -'e-'- -'i-'- -'o-'.docx

Python_Unit_III.pptx
Python_Unit_III.pptxPython_Unit_III.pptx
Python_Unit_III.pptxssuserc755f1
 
Multi lingual text-processing
Multi lingual text-processingMulti lingual text-processing
Multi lingual text-processingNAVER Engineering
 
Regular Expressions and You
Regular Expressions and YouRegular Expressions and You
Regular Expressions and YouJames Armes
 
Class 5 - PHP Strings
Class 5 - PHP StringsClass 5 - PHP Strings
Class 5 - PHP StringsAhmed Swilam
 
Chapter2CDpdf__2021_11_26_09_19_08.pdf
Chapter2CDpdf__2021_11_26_09_19_08.pdfChapter2CDpdf__2021_11_26_09_19_08.pdf
Chapter2CDpdf__2021_11_26_09_19_08.pdfDrIsikoIsaac
 
Punctuation and its uses in a report
Punctuation and its uses in a reportPunctuation and its uses in a report
Punctuation and its uses in a reportNoor Fatima
 
theory of computation lecture 02
theory of computation lecture 02theory of computation lecture 02
theory of computation lecture 028threspecter
 
3 character strings and formatted input output
3  character strings and formatted input output3  character strings and formatted input output
3 character strings and formatted input outputMomenMostafa
 
PERL Regular Expression
PERL Regular ExpressionPERL Regular Expression
PERL Regular ExpressionBinsent Ribera
 
Course 102: Lecture 13: Regular Expressions
Course 102: Lecture 13: Regular Expressions Course 102: Lecture 13: Regular Expressions
Course 102: Lecture 13: Regular Expressions Ahmed El-Arabawy
 

Ähnlich wie Using Python Program-We define the letters -'a-'- -'e-'- -'i-'- -'o-'.docx (18)

Python slide.1
Python slide.1Python slide.1
Python slide.1
 
Python_Unit_III.pptx
Python_Unit_III.pptxPython_Unit_III.pptx
Python_Unit_III.pptx
 
Python syntax
Python syntaxPython syntax
Python syntax
 
Multi lingual text-processing
Multi lingual text-processingMulti lingual text-processing
Multi lingual text-processing
 
Regular Expressions and You
Regular Expressions and YouRegular Expressions and You
Regular Expressions and You
 
Class 5 - PHP Strings
Class 5 - PHP StringsClass 5 - PHP Strings
Class 5 - PHP Strings
 
Chapter2CDpdf__2021_11_26_09_19_08.pdf
Chapter2CDpdf__2021_11_26_09_19_08.pdfChapter2CDpdf__2021_11_26_09_19_08.pdf
Chapter2CDpdf__2021_11_26_09_19_08.pdf
 
Lexical analyzer
Lexical analyzerLexical analyzer
Lexical analyzer
 
python_strings.pdf
python_strings.pdfpython_strings.pdf
python_strings.pdf
 
Regex lecture
Regex lectureRegex lecture
Regex lecture
 
Punctuation and its uses in a report
Punctuation and its uses in a reportPunctuation and its uses in a report
Punctuation and its uses in a report
 
theory of computation lecture 02
theory of computation lecture 02theory of computation lecture 02
theory of computation lecture 02
 
UNIT 4 python.pptx
UNIT 4 python.pptxUNIT 4 python.pptx
UNIT 4 python.pptx
 
3 character strings and formatted input output
3  character strings and formatted input output3  character strings and formatted input output
3 character strings and formatted input output
 
String in python
String in pythonString in python
String in python
 
PERL Regular Expression
PERL Regular ExpressionPERL Regular Expression
PERL Regular Expression
 
Trie Data Structure
Trie Data Structure Trie Data Structure
Trie Data Structure
 
Course 102: Lecture 13: Regular Expressions
Course 102: Lecture 13: Regular Expressions Course 102: Lecture 13: Regular Expressions
Course 102: Lecture 13: Regular Expressions
 

Mehr von rtodd575

Using the Arrhenius Equation calculate A and Ea for the line y--5723-4.docx
Using the Arrhenius Equation calculate A and Ea for the line y--5723-4.docxUsing the Arrhenius Equation calculate A and Ea for the line y--5723-4.docx
Using the Arrhenius Equation calculate A and Ea for the line y--5723-4.docxrtodd575
 
Using Dr-Racket I need to write a function that does the same thing as.docx
Using Dr-Racket I need to write a function that does the same thing as.docxUsing Dr-Racket I need to write a function that does the same thing as.docx
Using Dr-Racket I need to write a function that does the same thing as.docxrtodd575
 
Wendy is an accountant for a local service company- Without prior auth.docx
Wendy is an accountant for a local service company- Without prior auth.docxWendy is an accountant for a local service company- Without prior auth.docx
Wendy is an accountant for a local service company- Without prior auth.docxrtodd575
 
Week #3 1-ln Simple and Fractional Distillation experiment- fractional.docx
Week #3 1-ln Simple and Fractional Distillation experiment- fractional.docxWeek #3 1-ln Simple and Fractional Distillation experiment- fractional.docx
Week #3 1-ln Simple and Fractional Distillation experiment- fractional.docxrtodd575
 
weak Base- or Neutral)- In the Jirst column- you will also need to pro.docx
weak Base- or Neutral)- In the Jirst column- you will also need to pro.docxweak Base- or Neutral)- In the Jirst column- you will also need to pro.docx
weak Base- or Neutral)- In the Jirst column- you will also need to pro.docxrtodd575
 
Water WaterSolution6- Ahesion causes water to form a meniscus in a gr.docx
Water  WaterSolution6- Ahesion causes water to form a meniscus in a gr.docxWater  WaterSolution6- Ahesion causes water to form a meniscus in a gr.docx
Water WaterSolution6- Ahesion causes water to form a meniscus in a gr.docxrtodd575
 
Use the References to acceas important valuea if The hydronium ion con.docx
Use the References to acceas important valuea if The hydronium ion con.docxUse the References to acceas important valuea if The hydronium ion con.docx
Use the References to acceas important valuea if The hydronium ion con.docxrtodd575
 
Use the References to acce- It is often possible to change a hydrate i.docx
Use the References to acce- It is often possible to change a hydrate i.docxUse the References to acce- It is often possible to change a hydrate i.docx
Use the References to acce- It is often possible to change a hydrate i.docxrtodd575
 
Using Java- Evaluate the expression- Be sure to list a value of approp.docx
Using Java- Evaluate the expression- Be sure to list a value of approp.docxUsing Java- Evaluate the expression- Be sure to list a value of approp.docx
Using Java- Evaluate the expression- Be sure to list a value of approp.docxrtodd575
 
Use your favorite search engine to find the IRSSolutionS corporations.docx
Use your favorite search engine to find the IRSSolutionS corporations.docxUse your favorite search engine to find the IRSSolutionS corporations.docx
Use your favorite search engine to find the IRSSolutionS corporations.docxrtodd575
 
Wade draws a correlation between _____________________ and the onset o.docx
Wade draws a correlation between _____________________ and the onset o.docxWade draws a correlation between _____________________ and the onset o.docx
Wade draws a correlation between _____________________ and the onset o.docxrtodd575
 
Virtualization and the cloud Explain the differences between virtualiz.docx
Virtualization and the cloud Explain the differences between virtualiz.docxVirtualization and the cloud Explain the differences between virtualiz.docx
Virtualization and the cloud Explain the differences between virtualiz.docxrtodd575
 
Use the following terms to answer the question(s) below- A- This react.docx
Use the following terms to answer the question(s) below- A- This react.docxUse the following terms to answer the question(s) below- A- This react.docx
Use the following terms to answer the question(s) below- A- This react.docxrtodd575
 
Use the method of substitution to find the stationary values of Z- i-e.docx
Use the method of substitution to find the stationary values of Z- i-e.docxUse the method of substitution to find the stationary values of Z- i-e.docx
Use the method of substitution to find the stationary values of Z- i-e.docxrtodd575
 

Mehr von rtodd575 (14)

Using the Arrhenius Equation calculate A and Ea for the line y--5723-4.docx
Using the Arrhenius Equation calculate A and Ea for the line y--5723-4.docxUsing the Arrhenius Equation calculate A and Ea for the line y--5723-4.docx
Using the Arrhenius Equation calculate A and Ea for the line y--5723-4.docx
 
Using Dr-Racket I need to write a function that does the same thing as.docx
Using Dr-Racket I need to write a function that does the same thing as.docxUsing Dr-Racket I need to write a function that does the same thing as.docx
Using Dr-Racket I need to write a function that does the same thing as.docx
 
Wendy is an accountant for a local service company- Without prior auth.docx
Wendy is an accountant for a local service company- Without prior auth.docxWendy is an accountant for a local service company- Without prior auth.docx
Wendy is an accountant for a local service company- Without prior auth.docx
 
Week #3 1-ln Simple and Fractional Distillation experiment- fractional.docx
Week #3 1-ln Simple and Fractional Distillation experiment- fractional.docxWeek #3 1-ln Simple and Fractional Distillation experiment- fractional.docx
Week #3 1-ln Simple and Fractional Distillation experiment- fractional.docx
 
weak Base- or Neutral)- In the Jirst column- you will also need to pro.docx
weak Base- or Neutral)- In the Jirst column- you will also need to pro.docxweak Base- or Neutral)- In the Jirst column- you will also need to pro.docx
weak Base- or Neutral)- In the Jirst column- you will also need to pro.docx
 
Water WaterSolution6- Ahesion causes water to form a meniscus in a gr.docx
Water  WaterSolution6- Ahesion causes water to form a meniscus in a gr.docxWater  WaterSolution6- Ahesion causes water to form a meniscus in a gr.docx
Water WaterSolution6- Ahesion causes water to form a meniscus in a gr.docx
 
Use the References to acceas important valuea if The hydronium ion con.docx
Use the References to acceas important valuea if The hydronium ion con.docxUse the References to acceas important valuea if The hydronium ion con.docx
Use the References to acceas important valuea if The hydronium ion con.docx
 
Use the References to acce- It is often possible to change a hydrate i.docx
Use the References to acce- It is often possible to change a hydrate i.docxUse the References to acce- It is often possible to change a hydrate i.docx
Use the References to acce- It is often possible to change a hydrate i.docx
 
Using Java- Evaluate the expression- Be sure to list a value of approp.docx
Using Java- Evaluate the expression- Be sure to list a value of approp.docxUsing Java- Evaluate the expression- Be sure to list a value of approp.docx
Using Java- Evaluate the expression- Be sure to list a value of approp.docx
 
Use your favorite search engine to find the IRSSolutionS corporations.docx
Use your favorite search engine to find the IRSSolutionS corporations.docxUse your favorite search engine to find the IRSSolutionS corporations.docx
Use your favorite search engine to find the IRSSolutionS corporations.docx
 
Wade draws a correlation between _____________________ and the onset o.docx
Wade draws a correlation between _____________________ and the onset o.docxWade draws a correlation between _____________________ and the onset o.docx
Wade draws a correlation between _____________________ and the onset o.docx
 
Virtualization and the cloud Explain the differences between virtualiz.docx
Virtualization and the cloud Explain the differences between virtualiz.docxVirtualization and the cloud Explain the differences between virtualiz.docx
Virtualization and the cloud Explain the differences between virtualiz.docx
 
Use the following terms to answer the question(s) below- A- This react.docx
Use the following terms to answer the question(s) below- A- This react.docxUse the following terms to answer the question(s) below- A- This react.docx
Use the following terms to answer the question(s) below- A- This react.docx
 
Use the method of substitution to find the stationary values of Z- i-e.docx
Use the method of substitution to find the stationary values of Z- i-e.docxUse the method of substitution to find the stationary values of Z- i-e.docx
Use the method of substitution to find the stationary values of Z- i-e.docx
 

Kürzlich hochgeladen

1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...KokoStevan
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxnegromaestrong
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17Celine George
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docxPoojaSen20
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxVishalSingh1417
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfChris Hunter
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingTeacherCyreneCayanan
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfAyushMahapatra5
 

Kürzlich hochgeladen (20)

1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 

Using Python Program-We define the letters -'a-'- -'e-'- -'i-'- -'o-'.docx

  • 1. Using Python Program.We define the letters 'a', 'e', 'i', 'o' and 'u' as vowels. We do not consider any other letter as a vowel. Write a function named mostlyVowels() that returns a list of words in a body of text in which more than half the letters are vowels. Count both capitalized and lower case instances of the vowels. A word should appear in the return list at most once, no matter how many times it occurs in the input string. A capitalized instance of a word is the same word as a lower cased instance . For example, 'Is' and 'is' are the same word. Input: a string s that consist s of words, separated by spaces Return:a list of all words in the input string in which more than half the letters are vowels For example, the following would be correct output: >>> mlk = 'Our lives begin to end the day we become silent about things that matter' >>> print(mostlyVowels(mlk)) ['our', 'about'] Solution Hope this will help you!!!