Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

In python language please

image text in transcribed

image text in transcribed

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 ordo & 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)--->$ Dont give up ASCII(D)=68 ASCII(O)=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 ASCIIC=105 ASCII(V)=118 ASCII(C)=101 sum=103+105+118+101=427, The set are(4224), (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 $) a a 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)=S(Replaced with $) char(92)= char(92)= Output: (62 *JH SIV For example: Test Input Result 1 Dont give up (62 *IH S11

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions