Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

CS 100 Homework 06 Do all of the items below and submit a text file created with the IDLE editor (or other editor) with the

image text in transcribed
CS 100 Homework 06 Do all of the items below and submit a text file created with the IDLE editor (or other editor) with the extension py via Moodle. If you run into a problem, post to Moodle describing where you ran into trouble or email your instructor or classroom assistant, or ask your question during recitation hours. If you know the answer to someone's question on Moodle, post a response. You get course credit for asking and answering questions in Moodle. . Read Chapter 3 (Functions) In the textbook. .Read the Python tutorial section 4.6 (Defining Functions). The Python tutorial can be accessed through the documentation installed with IDLE: Help Python Docs Tutorial 4. More Control Flow' Tools-+46. Defining Functions If you are using an alternate IDE, visit: https://docs python.org/3/tutorial/controlflowhtmiRdefining-functions to browse the tutorial online. .In the Python editor IDLE, create and save a Python file that is named, if your name is Harry Houdini. for example, Hwe6 HarryHoudint.py and begins with a comment containing your name, class and section, the posting date and number of the homework assignment a. Write a function named hasFinalLetter that takes two parameters 1. strlist, a list of non-empty strings Letters, a string of upper and/or lower case letters 2. The function hasFinolLetter should create and return a list of all the strings in striist that end with a letter in Letters. Create three test cases, each consisting of a list of son-empty strings and a string of upper and/or lower case leters, for your function in Problem 1a One of these tests should retarn the empty list. For each test case write two assignment s pass the test arguments to your function. b. statements and a function call that a Write a function named isDivistble that takes two parameters 1 maxInt, an integer 2 twoints, a tuple of two integers sDivistble should create and return a list of all the ints in the range froms 1 to maxInt (not including maxInt) that are divisible of both ints in twoInt Create three test cases, each consisting of a function in Problem 2a One of these tests should return the empty list. For each test case write two assignment statements and a function call that pass the test arguments to your function b. value for maxiet and a value for twoInts, for your a Write a function named Longfnough that takes two parameters 4 threshold, an integer The function tongl nough should create and return a list of all the strings in words that are at least threshold characters long. If sone of the words are long enough then return an ompty b Create three test cases, each consisting of a value for werds and a value for ehreshold, for Have one test case where sone of the words are lang enough and verify that your function returns an empty st in that CS 100 Homework 06 Do all of the items below and submit a text file created with the IDLE editor (or other editor) with the extension py via Moodle. If you run into a problem, post to Moodle describing where you ran into trouble or email your instructor or classroom assistant, or ask your question during recitation hours. If you know the answer to someone's question on Moodle, post a response. You get course credit for asking and answering questions in Moodle. . Read Chapter 3 (Functions) In the textbook. .Read the Python tutorial section 4.6 (Defining Functions). The Python tutorial can be accessed through the documentation installed with IDLE: Help Python Docs Tutorial 4. More Control Flow' Tools-+46. Defining Functions If you are using an alternate IDE, visit: https://docs python.org/3/tutorial/controlflowhtmiRdefining-functions to browse the tutorial online. .In the Python editor IDLE, create and save a Python file that is named, if your name is Harry Houdini. for example, Hwe6 HarryHoudint.py and begins with a comment containing your name, class and section, the posting date and number of the homework assignment a. Write a function named hasFinalLetter that takes two parameters 1. strlist, a list of non-empty strings Letters, a string of upper and/or lower case letters 2. The function hasFinolLetter should create and return a list of all the strings in striist that end with a letter in Letters. Create three test cases, each consisting of a list of son-empty strings and a string of upper and/or lower case leters, for your function in Problem 1a One of these tests should retarn the empty list. For each test case write two assignment s pass the test arguments to your function. b. statements and a function call that a Write a function named isDivistble that takes two parameters 1 maxInt, an integer 2 twoints, a tuple of two integers sDivistble should create and return a list of all the ints in the range froms 1 to maxInt (not including maxInt) that are divisible of both ints in twoInt Create three test cases, each consisting of a function in Problem 2a One of these tests should return the empty list. For each test case write two assignment statements and a function call that pass the test arguments to your function b. value for maxiet and a value for twoInts, for your a Write a function named Longfnough that takes two parameters 4 threshold, an integer The function tongl nough should create and return a list of all the strings in words that are at least threshold characters long. If sone of the words are long enough then return an ompty b Create three test cases, each consisting of a value for werds and a value for ehreshold, for Have one test case where sone of the words are lang enough and verify that your function returns an empty st in that

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

Database Theory Icdt 97 6th International Conference Delphi Greece January 8 10 1997 Proceedings Lncs 1186

Authors: Foto N. Afrati ,Phokion G. Kolaitis

1st Edition

3540622225, 978-3540622222

More Books

Students also viewed these Databases questions

Question

e. Compute R2 and .

Answered: 1 week ago

Question

Explain all drawbacks of application procedure.

Answered: 1 week ago