Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

Your horse has to have 1 ounce of probiotic supplement a day. You can buy it per


pound, as a 10 lb pail at a 10% discount, or as a 20 lb pail at a 15% discount. Your


goal is to produce formatted output showing the daily cost for each buying


option. You should ask the user to enter the price per lb.



Your horse has to have 1 ounce of probiotic supplement a day. You can buy it per


pound, as a 10 lb pail at a 10% discount, or as a 20 lb pail at a 15% discount. Your


goal is to produce formatted output showing the daily cost for each buying


option. You should ask the user to enter the price per



Write a program that prompts the user to input a four-digit positive integer. The program then outputs
the digits of the number, one digit per line.
Write a program that prompts the user to input a four-digit positive integer. The program then outputs
the digits of the number, one digit per line. For example, if the input is 3245, the output is:
3
2
4
5
Write a program that prompts the user to input the x-y coordinate of a point in a Cartesian plane. The
program should then output a message indicating whether the point is the origin, is located on the x-
(or y-) axis, or appears in a particular quadrant. For example:
(0, 0) is the origin
(4, 0) is on the x-axis
(0, -3) is on the y-axis
(-2, 3) is in the second quadrant

Write a Python program that has a runtime error.

Provide the following.

  • The code of your program.
  • Output demonstrating the runtime error, including the error message.
  • An explanation of the error message.
  • An explanation of how to fix the error.



def countdown(n):

if n <= 0:

print('Blastoff!')

else:

print(n)

countdown(n-1)


Write a new recursive function countup that expects a negative argument and counts “up” from that number. Output from running the function should look something like this:


>>> countup(-3)

-3

-2

-1

Blastoff!


Write a Python program that gets a number using keyboard input. (Remember to use input for Python 3 but raw_input for Python 2.)


If the number is positive, the program should call countdown. If the number is negative, the program should call countup. Choose for yourself which function to call (countdown or countup) for input of zero.


Provide the following.


The code of your program.

Output for the following input: a positive number, a negative number, and zero.

An explanation of your choice for what to call for input of zero.



Given that n refers to a positive int use a while loop to compute the sum of the cubes of the first n counting numbers, and associate this value with total. Use no <span style="text-decoration-line: none;">variables</span> other than n, k, and total.



Write a program to calculate the number of objects created and destroyed for the
counter class.
Write a class marks with three data members to store three marks. Write three
member functions, set_marks() to input marks, sum() to calculate and return the sum
and avg() to calculate and return average marks.
LATEST TUTORIALS
APPROVED BY CLIENTS