ASCII(e)=101 sum=103+105+118+101-427. The set are(42.24). (47.74).(27.72), The biggest values in a set is (42.74.72) char(42) char(74) J char(72)=H ASCII(u)=117 ASCII(p)=112 sum=117+112=229. The set are (22.22). (29.92). (29.92). The biggest values in a set is(22.92.92) char(22)=$(Replaced with $) char(92)=\ char(92)=\ Output: (62 *JH $\\ For example: Test Input Result 1 Dont give up (62 3H $\\

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter15: Recursion
Section: Chapter Questions
Problem 20PE
icon
Related questions
Question
In python language please
Input a sentence from the user and compute the following:
Eg: Dont give up
Find the ASCII value for each character of each word and calculate the sum.
//hint use ord() & chr() function are used to find corresponding ASCII & char values in python.
//*if you get any value ranges from 1 to 32 then replace with $ symbol
//char[1-32]--->S
Dont give up
ASCII(D)=68
ASCII (0)=111
ASCII(n)=110
ASCII(t)=116
sum=68+111+110+116=405. The set are (40, 04), (45,54), (05,50). The biggest values in a set is(40, 54, 50).
char(40)=(
char(54)=6
char(50)=2
ASCII(g)=103
ASCII()=105
ASCII(v)=118
ASCII(e)=101
sum=103+105+118+101-427, The set are(42.24), (47,74),(27,72), The biggest values in a set is (42.74,72)
char(42)=*
char(74)=)
char(72)=H
ASCII(u)=117
ASCII (p)=112
sum=117+112=229, The set are (22.22). (29.92). (29.92), The biggest values in a set is(22.92.92)
char(22)=$(Replaced with S)
Transcribed Image Text:In python language please Input a sentence from the user and compute the following: Eg: Dont give up Find the ASCII value for each character of each word and calculate the sum. //hint use ord() & chr() function are used to find corresponding ASCII & char values in python. //*if you get any value ranges from 1 to 32 then replace with $ symbol //char[1-32]--->S Dont give up ASCII(D)=68 ASCII (0)=111 ASCII(n)=110 ASCII(t)=116 sum=68+111+110+116=405. The set are (40, 04), (45,54), (05,50). The biggest values in a set is(40, 54, 50). char(40)=( char(54)=6 char(50)=2 ASCII(g)=103 ASCII()=105 ASCII(v)=118 ASCII(e)=101 sum=103+105+118+101-427, The set are(42.24), (47,74),(27,72), The biggest values in a set is (42.74,72) char(42)=* char(74)=) char(72)=H ASCII(u)=117 ASCII (p)=112 sum=117+112=229, The set are (22.22). (29.92). (29.92), The biggest values in a set is(22.92.92) char(22)=$(Replaced with S)
ASCII(e)=101
sum=103+105+118+101=427. The set are(42.24). (47.74).(27.72). The biggest values in a set is (42,74,72)
char(42)=*
char(74)=J
char(72)=H
ASCII(u)=117
ASCII (p)=112
sum=117+112=229. The set are (22.22). (29.92). (29.92), The biggest values in a set is(22.92.92)
char(22)=$(Replaced with $)
char(92)=\
char(92)=\
Output:
(62 *JH S\\
For example:
Test Input
1
Result
Dont give up (62 3H $\\
Transcribed Image Text:ASCII(e)=101 sum=103+105+118+101=427. The set are(42.24). (47.74).(27.72). The biggest values in a set is (42,74,72) char(42)=* char(74)=J char(72)=H ASCII(u)=117 ASCII (p)=112 sum=117+112=229. The set are (22.22). (29.92). (29.92), The biggest values in a set is(22.92.92) char(22)=$(Replaced with $) char(92)=\ char(92)=\ Output: (62 *JH S\\ For example: Test Input 1 Result Dont give up (62 3H $\\
Expert Solution
steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
Counting Sort
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
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr