Questions: 5 831

Answers by our Experts: 5 728

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

1. Copy the countdown function from Section 5.8 of your textbook. 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.
Describe the difference between a chained conditional and a nested conditional. Describe a strategy to avoid nested conditions. Give an example of a nested conditional that can be changed to a single conditional, and show the equivalent unique conditional
write a program that uses input to prompt a user for their name
Écrivez un programme Python qui obtient un nombre en utilisant la saisie au clavier .

Si le nombre est positif, le programme doit appeler le compte à rebours . Si le nombre est négatif, le programme doit appeler le compte à rebours . Choisissez vous - même fonction à appeler ( compte à rebours ou countup ) pour l' entrée de zéro.

Fournissez les informations suivantes.

Le code de votre programme.
Sortie pour l'entrée suivante: un nombre positif, un nombre négatif et zéro.
Une explication de votre choix sur ce qu'il faut appeler pour une entrée de zéro.
Describe the difference between a chained conditional and a nested conditional.
Describe a strategy to avoid nested conditions. Give an example of a nested conditional that can be changed to a single conditional, and show the equivalent unique conditional
1- Design a program for West LA College. Assume the current tuition is $15,000 per year, and tuition is expected to increase by 4 percent each year. Display the tuition each year for the next 10 years.

2. Modify the West LA College program so that the user enters the rate of tuition increase instead of having it fixed at 4 percent.

3. Modify the West LA College program so that the user enters the rate of tuition increase for the first year. The rate then increases by 0.5 percent each subsequent year.
create a code that plots 1000 random points each with their own random color on a user interface using codeskulptor and simplegui.
create a code that plots 1000 random points each with their own random color on a user interface.
1. Copy the countdown function from Section 5.8 of your textbook.

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.
Part 1

The volume of a sphere is 4/3πr3, where π has the value of "pi" given in Section 2.1 of your textbook. Write a function called print_volume (r) that takes an argument for the radius of the sphere, and prints the volume of the sphere.

Call your print_volume function three times with different values for radius.

Include all of the following in your Learning Journal:

The code for your print_volume function.
The inputs and outputs to three calls of your print_volume.

Part 2

Write your own function that illustrates a feature that you learned in this unit. The function must take at least one argument. The function should be your own creation, not copied from any other source. Do not copy a function from your textbook or the Internet.

Include all of the following in your Learning Journal:

The code for the function that you invented.
The inputs and outputs to three calls of your invented function.
A description of what feature(s) your function illustrates.
LATEST TUTORIALS
APPROVED BY CLIENTS