1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
miv72 [106K]
3 years ago
8

Print a countdown from n to 1 The function below takes one parameter: an integer (begin). Complete the function so that it print

s the numbers starting at begin down to 1, each on a separate line. There are two recommended approaches for this:
(1) use a for loop over a range statement with a negative step value, or

(2) use a while loop, printing and decrementing the value each time.

student.py 1 - def print_countdown(begin): # Implement your function here. Be sure to indent your code block! Restore original file
Computers and Technology
1 answer:
Luba_88 [7]3 years ago
4 0

Answer:

Explanation:

>>> def print_countdown(begin)

>>> i = begin

>>> while i < 1:

>>>  print(i)

>>>  i = i - 1

>>>print_countdown(0)

You might be interested in
Which statement is true about the elements of the interface of a presentation program?
Anton [14]
<span>C. Rulers indicate the margins, tabs, and indents in a presentation slide.
</span>
6 0
3 years ago
Read 2 more answers
What kind of graphic can be resized without losing image quality?
Ivahew [28]
It can be called Resolution Independent
6 0
4 years ago
Read 2 more answers
Write a Qbasic program to read the value of base and height of a triangle and find its area. ​
Komok [63]

Answer:

The program to this question as follows:

Program:

PRINT "Program: Area of Triangle" 'print message

INPUT "Enter base: ", base 'defining the variable base and input value from the user

INPUT "Enter height:",height 'defining variable height and input a value from user

Area=base*height/2 'formula to calculate Area

PRINT "Area of Triangle:", Area 'print Area

Output:

Program: Area of Triangle

Enter base:   2

Enter height:  3

Area of Triangle: 3

Explanation:

In the above Qbasic program, first, a print function is used to print the message. In the next line, the input function is defined, which uses the "base and height" variable for user input.

Then another variable "Area" is defined that uses user input values to calculate the area of a triangle, and also store its calculated value.  At the last, the print function is used to print Area variable value  

5 0
3 years ago
Create a button to play the playlist <br><br> Java, netbeans
Pavel [41]
I'm not sure but maybe one of the two websites can help you
.
http://wiki.netbeans.org/MusicAppUsingRESTRemoting

https://mukeshscience.wordpress.com/2014/05/26/adding-audio-to-java/

6 0
4 years ago
Read 2 more answers
In 2009 to 2010, how many social network users were reported as being victims of online abuse?
Dafna1 [17]
The answer is B because being victims of online abuse is not important
7 0
3 years ago
Read 2 more answers
Other questions:
  • Using a loop, write a program that reads in exactly five integers and outputs the sum.
    11·1 answer
  • Name of main component of fifth generation of computer​
    6·1 answer
  • The processor in Q1 above is converted into an 8-stage pipeline, similar to the one discussed on slide 8 of lecture 16. It takes
    6·1 answer
  • As the European powers grew more industrialized, their colonies became very important as sources of A)slave labor. B)raw materia
    12·2 answers
  • ________ is a type of attack in which the attacker takes control of a session between two machines and masquerades as one of the
    5·1 answer
  • What hardware architectures are not supported by Red Hat?
    15·1 answer
  • Drag each tile to the correct box. (No links please)
    8·2 answers
  • Time management is the ability to use time effectively.
    13·2 answers
  • What are the two methods of creating a folder​
    11·1 answer
  • Here, Do this for 100 points its simple just know how to use flowchart
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!