Posted at 14:16h
in
Uncategorized
by admin
Question:
Create an FluidConversion object to convert any number of fluid units to the equivalent number of gallons, quarts, pints, and gills. (There are 128 fluid ounces in a gallon. There are 32 fluid ounces in a quart. There are 16 fluid ounces in a pint. There are...
Posted at 18:23h
in
Uncategorized
by admin
Question 1:
Create a Tank class which have the attributes of:
name
direction(use ‘up’, ‘down’, ‘left’ or ‘right’)
x position and
y position
The class also have the following method:
move (self, direction, steps)
Using __init__() to Initial the tank to make sure it start from x position of 0,...
Posted at 16:59h
in
Uncategorized
by admin
Question:
The Body Mass Index (BMI) is one of the calculations used by doctors to assess an adult’s health. The doctor measures the patient’s height (in meters) and weight (in kilograms), then calculates the BMI using the formula
BMI = weight / (height * height)
Write a program which...
Question:
please read question and try to understand it. Then the sample of input, output and explaination of output will help you a lot.
Problem Description:
You decide to go for a very long drive on a very straight road. Along this road are five cities. As you...
Posted at 01:24h
in
Uncategorized
by admin
Question 1:(please use function that return a value)
Write a program to display information to a driver based on his/her speed according to the following table:
km/h over the limit
Fine
1 to 20
$100
21 to 30
$270
31 or above
$500
Sample Input 1:
Enter the speed limit: 40
Enter the recorded speed of the...
Posted at 02:16h
in
Uncategorized
by admin
Question:
Using function or object method to write a program to return the number of times that the string
"code" appears anywhere in the given string, except we'll accept any letter for the 'd', so "cope" and "cooe" count.
For example:
'aaacodebbb' will have 1 "code"
'codexxcode' will have 2 "code"
'cozexxcope'...