Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Scenario : You work for the advertising department of a company that sells condiments. Unfortunately, all of the market research explaining which people should be

Scenario: You work for the advertising department of a company that sells condiments. Unfortunately, all of the market research explaining which people should be shown which condiments in their ads has been lost in a sharknado. (It was terrifying, by the way.) The programmers are out sick (someone brought a bad spinach dip to Billys going-away party) and your boss needs some mustard and ketchup ads to get posted immediately. Your boss doesnt really care about who sees which condiment, only that roughly the same amount of people see each condiment.

Since you know a little Python, you figure that youre up for the task. Your boss wants to see how good you are at crafting advertisement text, so youll need to write one ketchup ad and one mustard ad.

Task: Write a function that prints your ad text numAds times. Because you need to show the mustard and ketchup ads roughly the same number of times, you should alternate the printing of the ads, starting with the ketchup ad. The only requirement on the ad text is that the ketchup ad must start with

"Ketchup Ad: "

followed by your ketchup ad text and the mustard ad must start with

"Mustard Ad: "

followed by your mustard ad text. (Note the space after the colon in both cases.)

For example, if numAds = 5, your function would print

Ketchup Ad: This red stuff made from tomatoes is better on fries than mayo! Mustard Ad: Golden, spicy, dijon: whichever your flavor, weve got the tastes youll savor! Ketchup Ad: This red stuff made from tomatoes is better on fries than mayo! Mustard Ad: Golden, spicy, dijon: whichever your flavor, weve got the tastes youll savor!

Ketchup Ad: This red stuff made from tomatoes is better on fries than mayo!

Youll need to come up with your own ad text, though. Make sure you do, as your boss (i.e., your TA) will be checking your creativity!

Use the following function header:

def printCondimentAd(numAds):

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 And Application Bio Science And Bio Technology International Conferences DTA And BSBT 2011 Held As Part Of The Future Generation In Computer And Information Science 258

Authors: Tai-hoon Kim ,Hojjat Adeli ,Alfredo Cuzzocrea ,Tughrul Arslan ,Yanchun Zhang ,Jianhua Ma ,Kyo-il Chung ,Siti Mariyam ,Xiaofeng Song

2011th Edition

3642271561, 978-3642271564

More Books

Students also viewed these Databases questions