April 1, 2015

Homework Help: Computer Science(python)

Posted by Michael on Friday, October 12, 2012 at 4:02pm.

Service Price
Basic Lawn Mowing $20
Trimming and Sweeping $25
Pool Cleaning $50
Watering Plants $10

Prompt the user to input whether or not they want each of the services. You can assume the input will be a character that is either a 'y' or an 'n'. Print out the total of the bill. Write this as efficiently as you can, using as few comparisons and if statements as possible, no more than 4 if statements.

Example run:
Enter your choices as y or n.
Do you want Basic Lawn Mowing? y
Do you want Trimming and Sweeping? n
Do you want Pool Cleaning? y
Do you want Watering Plants? n

The total for your services is $70
Thank you for your business!

I'm having a little trouble with this problem. Anyone got any ideas

Answer this Question

First Name:
School Subject:

Related Questions

microeconomics problems - The GreenAcres mowing company wants to buy the new ...
Computer Science-Java - Hi, I have to prompt a user to input a password and have...
English - 1. Jenny's family are/is following her. She is taking a walk with her ...
Math - A rectangular lawn is 60meters by 80meters. A part of the lawn is torn ...
programming - Using Raptor, create a condition loop that will ask the user for ...
Computer Science - write a program that will prompt the user for a value and ...
java - Write a java application that finds the smallest of several integers. ...
math question - A dry cleaning service decided to raise the price of dry ...
Math - A lawn service will fertilize a lawn at at a rate of 59cents per 100 ...
computer science - Write an Assembly program to determine the price of a car ...