Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

8:31 LabAct3.pdf 3 of 6 1 def sample (a)s 2 for I In range(a) print(1) print(odd' When you are done you will put your name,

image text in transcribed
8:31 LabAct3.pdf 3 of 6 1 def sample (a)s 2 for I In range(a) print(1) print(odd' When you are done you will put your name, person number and UBIT usename on it and tum it into the TA You will have 15 minutes to complete this task. If you are late and goes have started, you will not be allowed to complete this task for points Part 2: Python To start solving the professor's problem (at least this one, they probably have many) the professor wants to consider delermining the location based on how much reading they will need to do Part 2a: 15 Points) You are going to help this professor out more by weilting a function which delermines the lengt of all their books combined. This is helpful since to sort it themseves, they will have to read al these books (don't worry, the professor was able to generate the list of books from their online book retailer) The function ttle length will take in the list ofl book ste strings as the parameter The funcion will then retum the combined length of all the book tite strings. For example consider if the professor's list only had two books: "Alice in Wonderland (which has 19 letters) and Ready Player One(which has 16 letters). In this case, your function should neturn 35 as the number of characters to read in that collection of books. Part 2b: (4 Polints) Now that the professor knows how many characters aro iter ale to determine how much time it will take to read all the book titles. Create a function Time to nead that takes in a list of book title strings and returns the number of seconds required to read all df the tides. To calculate this, assume that a person reads 15 characters a second From the example above in Part 2a, it would take 2.33 seconds, t is possible the professor doent always read that fast, so round up the calculation to the next second, so you should returm 3 When this is complete, both functions utdle length and time to read need to be in a single main py fle and zipped, then submit it to Autolab in the submission designated Tab Acivity3 Python Part 3: Javascript The professor has decided they don't feel like reading and wares to consider some other ways to sort their books. After realizing how many words would need to be read in the process of going through all the books, a really nice student went through and removed all the books that were published more than 20 years ago. Now the professor is justgoing to look at how many books they can fit

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

Recommended Textbook for

Larry Ellison Database Genius Of Oracle

Authors: Craig Peters

1st Edition

0766019748, 978-0766019744

More Books

Students also viewed these Databases questions

Question

3. Discuss the process of behavior modeling training.

Answered: 1 week ago