Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You and your date are trying to get a table at a restaurant. The parameter me is the stylishness of your clothes, in

You and your date are trying to get a table at a restaurant. The parameter "me" is the stylishness of your clothes, in the range 0..10, and "date" is the stylishness of your date's clothes in the same range. The result of getting the table is returned as a string value as "no", "maybe", or "yes". Write a function dateFashion() that takes two parameters, you and date. If either of you is very stylish, 8 or more, then the result is "yes". With the exception that if either of you has style of 2 or less, then the result is "no". Otherwise the result is "maybe".Write a function printNth() that takes a list Ist and a positive (>=0) integer n as parameters. It prints every nth item in Ist, one per line, beginning with the first item in the list. For example, if n is 2, the function will print every other item in the list, beginning with the first item. The function must work regardless of the type of items that are in the list. If the parameter n is zero or negative the function should not print anything. The function should not modify the list provided as a parameter. Hint: Use an range loop (i.e. one that uses the range() function see slides from last week.)! The following shows several sample runs of the function:Removing Negative NumbersWrite a function removeNegatives (lst) that takes a list of integers as input and removes all negative numbers from the list. The function should modify the original list in place and return the modified list.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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 is management growth? What are its factors

Answered: 1 week ago