Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

CSE_120 Sir_it_is_urgent.do_fast._Please_solve_this_code_in_python3_paste_with_proper_intendent_blocks_bypressing(CTRL+SHIFT+V),Also_please_provide_code_screenshot,_Thank_you. Do_not_need_comments. SKIP_BUILT_IN_FUNCTIONS. Just_give_me_solution_as_fast_as_possible._I_am_running_out_of_time._Attach_a_screenshot_with_yoursolve. Question-1: Assume, you have been given a string that has a combination of uppercase and lowercase letters. Write a python

CSE_120

Sir_it_is_urgent.do_fast._Please_solve_this_code_in_python3_paste_with_proper_intendent_blocks_bypressing(CTRL+SHIFT+V),Also_please_provide_code_screenshot,_Thank_you.

Do_not_need_comments. SKIP_BUILT_IN_FUNCTIONS. Just_give_me_solution_as_fast_as_possible._I_am_running_out_of_time._Attach_a_screenshot_with_yoursolve.

Question-1: Assume, you have been given a string that has a combination of uppercase and lowercase letters. Write a python program that will find out the ascii values of uppercase and lowercase letters and put them in two lists. Now, your task is to multiply the first element of the first list, to the last element of the second list and store them in another list. Then, again multiply the second element of the first list, to the second last element of the second list and so on. If any of your list is out of element, and another list has some elements remaining, then just append the remaining elements to your final list and print the list. ================================================ Given String 1: HogWaRTs Sample output 1: ASCII values of uppercase letters: [72, 87, 82, 84] ASCII values of lowercase letters: [111, 103, 97, 115] Ans: [8280, 8439, 8446, 9324]

Explanation1: Here, after finding out the ascii values of uppercase and lowercase letters, the lists look like this, [72, 87, 82, 84], [111, 103, 97, 115]. Now if we multiply 72 with 115, we get 8280. Similarly, 8797=8439 and so on. ================================================ Given String 2: HogwarTs

Sample output 2: ASCII values of uppercase letters: [72, 84] ASCII values of lowercase letters: [111, 103, 119, 97, 114, 115] Ans: [8280, 9576, 111, 103, 119, 97]

Explanation2: Here, after finding out the ascii values of uppercase and lowercase letters, the lists look like this, [72, 84], [111, 103, 119, 97, 114, 115]. Now if we multiply 72 with 115, we get 8280. Similarly, 84114=9576 and lowercase letters have additional elements 111, 103, 119, 97 at the beginning. So, after adding the multiplied values, the additional elements have been appended to the answer list. Given String 3: hOGWARtS Sample output 3: ASCII values of uppercase letters: [79, 71, 87, 65, 82, 83] ASCII values of lowercase letters: [104, 116] Ans: [9164, 7384, 87, 65, 82, 83]

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

Question

What are the objectives of performance appraisal ?

Answered: 1 week ago

Question

State the uses of job description.

Answered: 1 week ago