Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

There are several deliverables for this assignment. Please submit the following files to zyBooks: small_functions.py Activity #1: Small functions-individual This activity is meant to

 image

There are several deliverables for this assignment. Please submit the following files to zyBooks: small_functions.py Activity #1: Small functions-individual This activity is meant to give you more experience writing functions. Name your file small_functions.py and include all of the following parts in one file. For all parts, include the function named as specified in your submission. Your program does NOT have to include output, however you should test your functions. For example, you might include several function calls and print the results. You may make multiple functions within any one of these problems as long as the main function is named accordingly. Please comment out ALL input () statements before submitting. a) Imagine that you have a spherical bead. In other words, a sphere with a cylindrical hole drilled through the middle: Write a function named parta that will take in as parameters the radius of the sphere and the radius of the hole, and return the volume of the bead. b) Write a function named partb that will take in as a parameter a positive integer n and determines if n can be calculated as the sum of 2 or more consecutive positive, odd integers. If it can, return a list of the numbers, otherwise return False. c) Write a function named partc that will take in as parameters a single character, a person's name, company, and email, and returns a single string of the person's digital business card. Use the character as a border, and provide 2 spaces as padding on either side of the longest entry. Your function must return a single string, do NOT print the digital card. Example using parameters (***, Dr. Ritchey', 'Texas A&M University', 'snritchey@tamu.edu"): Dr. Ritchey Texas A&M University anritchey@tamu.edu d) Write a function named partd that takes in as a parameter one list of numbers and returns the minimum, median, and maximum value of the list, in that order. Lab: Topic 9 (individual) e) Write a function named parte that takes in as parameters two parallel lists: a list of times (in increasing order), and a list of distances traveled by that point in time. The function should return a new list giving the velocity between consecutive time measurements. The new list should have a length of one less than the original lists. f) Write a function named partf that takes in as a parameter one list of numbers and determines if two of the numbers in the list add to 2026. If they do, return the product of the two numbers, otherwise return False.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

a Function to count the number of times e appears in a string python def countestring return stringc... 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

Income Tax Fundamentals 2013

Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill

31st Edition

1111972516, 978-1285586618, 1285586611, 978-1285613109, 978-1111972516

More Books

Students also viewed these Programming questions

Question

Why do you think this problem has occurred?

Answered: 1 week ago