The exercise is to input a string from the user, and then output the following information: • Length of string (# of characters, including spaces and punctuation) • # of vowels in the string (a, e, i, o, u) • # of each vowel # of digraphs in the string (ai, ch, ea, ie, ou, ph, sh, th, wh) # of each digraph . Page 1 of 5

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
icon
Concept explainers
Question

F# 

Requirements are NO loops NO variables 

I have most of it done there are some errors i cant figure out. 

This is what i have so far 

 

 

The exercise is to input a string from the user, and then output the following information:
•
Length of string (# of characters, including spaces and punctuation)
# of vowels in the string (a, e, i, o, u)
•
•
# of each vowel
# of digraphs in the string (ai, ch, ea, ie, ou, ph, sh, th, wh)
# of each digraph
For simplicity, only count lower-case vowels and digraphs. To help you get started, we are providing starter
code that inputs a string from the user and calls a few functions that currently return 0:
> dotnet zun
Starting
input> this is a test
exploded: ['t'; "h"; "4";
length: 0
vowels: 0
imploded: "this is a test"
Done
> dotnet zun
Starting
When your program is complete, here's an example of how it should behave given the input: "shush!" said
the person on the train as i used my phone
input>"shush!" said the person on the train as i used my phone
exploded: [***; 's'; 'h'; _'u'; 'a'p_h*;_^4^p
"e": ""; "p': 'e'; 'x'; 'a'; 'o'; 'n';
"t"; "x"; "a'; '4'; 'n'; ''; 'a'; "a"; " "; 15; 25; Nut; tata tet; "d"; "N
"m"; "y": ""; "p': 'h'; 'o'; 'n'; "e"]
length: 56
vowels: 16
'a': 3
'e': 5
'i': 3
'o': 3
'u': 2
digraphs: 7
'a', '1': 2
'c','h': 0
'e', 'a': @
'1', 'e': 0
Q x
's'; 't']
'o', 'u': @
"p","h": 1
"a","h": 2
't','h': 2
imploded: ""shush!" said the person on the train as i used my phone"
Done
Page 1 of 5
ax
"; "s'; 'a': '4'; 'd'; * '; 't'; 'h';
"; "o"; "n"; ""; "t"; "h"; "e"; "t
The most natural way to solve this problem in a functional language is to convert the input string to a list of
characters, and then work with the resulting list. Two functions are provided for converting strings: explode s
takes a string and returns a list of characters, and implode L takes a list of characters and returns a string.
Here's the starter code here for your reference:
Transcribed Image Text:The exercise is to input a string from the user, and then output the following information: • Length of string (# of characters, including spaces and punctuation) # of vowels in the string (a, e, i, o, u) • • # of each vowel # of digraphs in the string (ai, ch, ea, ie, ou, ph, sh, th, wh) # of each digraph For simplicity, only count lower-case vowels and digraphs. To help you get started, we are providing starter code that inputs a string from the user and calls a few functions that currently return 0: > dotnet zun Starting input> this is a test exploded: ['t'; "h"; "4"; length: 0 vowels: 0 imploded: "this is a test" Done > dotnet zun Starting When your program is complete, here's an example of how it should behave given the input: "shush!" said the person on the train as i used my phone input>"shush!" said the person on the train as i used my phone exploded: [***; 's'; 'h'; _'u'; 'a'p_h*;_^4^p "e": ""; "p': 'e'; 'x'; 'a'; 'o'; 'n'; "t"; "x"; "a'; '4'; 'n'; ''; 'a'; "a"; " "; 15; 25; Nut; tata tet; "d"; "N "m"; "y": ""; "p': 'h'; 'o'; 'n'; "e"] length: 56 vowels: 16 'a': 3 'e': 5 'i': 3 'o': 3 'u': 2 digraphs: 7 'a', '1': 2 'c','h': 0 'e', 'a': @ '1', 'e': 0 Q x 's'; 't'] 'o', 'u': @ "p","h": 1 "a","h": 2 't','h': 2 imploded: ""shush!" said the person on the train as i used my phone" Done Page 1 of 5 ax "; "s'; 'a': '4'; 'd'; * '; 't'; 'h'; "; "o"; "n"; ""; "t"; "h"; "e"; "t The most natural way to solve this problem in a functional language is to convert the input string to a list of characters, and then work with the resulting list. Two functions are provided for converting strings: explode s takes a string and returns a list of characters, and implode L takes a list of characters and returns a string. Here's the starter code here for your reference:
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
Control Structure
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education