Question: USING PYTHON!! The second function you will write should be called sumOrd. Your function should take one (1) argument, a list containing characters or the

USING PYTHON!! The second function you will write should be called sumOrd. Your function should take one (1) argument, a list containing characters or the integer -1. For example: [a, b, c, -1, d, e, -1] would be a valid input argument. You may assume all input will be valid. The function should return one (1) integer calculated as follows. The return value should be the sum of all the return values of the ord() function evaluated on each character until a -1 is encountered. You may not use any built-in functions other than ord(). Additionally, you must use an indefinite loop (a while loop). There may be NO return statement in the body of the loop (i.e., the return statement must come outside the while loop). For example, if [a, b, c, -1, d, e, -1] is the input, then the return value should be calculated as: ord(a) + ord(b) + ord(c). To get credit you must use a single while loop. Testing: Create your own test cases.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!