Computer Science essay
Homework 5Due September 28, 2021, Final day to show in with out penalty: October 7For a Google Colab starter file, go to https://colab.analysis.google.com/drive/1_ wgJnxUr6S2y6PZ9BnITAlqnozGhiNE8. Do all questions in the identical pocket book (however use totally different cells), so that you just solely must share and allow one hyperlink in your submission.1. For every of the next issues, describe in phrases, not code what numbers every of the next lists consists of. Be sure you embody the primary and final variety of the listing in your description. You might run the code in an effort to confirm your outcomes.(a) vary(10)(b) vary(three, 52)(c) vary(5, 99, 2)(d) vary(99, 5, -2)(e) vary(5, 99, -2)2. Write a program that takes a listing of strings (phrases) and prints the longest phrase. For instance, if phrases = [’cat’,’dog’,’goat’,’elephant’], print ’elephant’. If there's a tie, chances are you'll print any phrase that's the longest. For instance, if phrases = [’cat’,’dog’], chances are you'll print both ’cat’ or ’canine’.three. Write a program that takes a listing, “nums”, consisting of 2n components within the kind [x1, x2, . . . , xn, y1, y2, . . . , yn], and return the listing within the kind [x1, y1, x2, y2, . . . , xn, yn]. For instance, if nums = [5, 8, 1, 4, 2, 3], this system ought to output [5, 4, 8, 2, 1, 3]. Trace: Discover the center aspect. Break up the listing into two sub-lists, create an empty listing after which append one aspect from every sub-list till you get to half the size of the listing.four. Given a listing of numbers, “nums”, and one other quantity, “indicator”, rely what number of numbers within the listing are lower than “indicator”. For instance, if nums = [5, 1, 2, 7, 4, 3, 11] and indicator = four, then output three, since [1, 2, 3] are all lower than four (be aware that four just isn't lower than four).5. Establish and proper the errors within the following code, which is meant to take a listing of numbers and print the numbers which are divisible by three. For instance, if nums = [1, 4, 5, 7, 9, 12, 13], then print the numbers 9 and 12 (code on the subsequent web page).1https://colab.analysis.google.com/drive/1_wgJnxUr6S2y6PZ9BnITAlqnozGhiNE8 https://colab.analysis.google.com/drive/1_wgJnxUr6S2y6PZ9BnITAlqnozGhiNE8 def print_div_by_3():for num in nums:if num // three = zero:li.append(num)return linums = [1, 4, 5, 7, 9, 12, 13]print_div_by_32-research paper writing service