Computers and Technology

Learning journal unit 3 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.

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 20.06.2019 18:04, theman300045
What is secondary exchange ? - apex a. returning a product you are unhappy with b. buying the same product more than once c. buying from people instead of companies d. recycling a previously recycled product
Answers: 2
image
Computers and Technology, 23.06.2019 02:30, jalaholmes2027
Three out of five seniors remain undecided about a college major at the end of their senior year.
Answers: 3
image
Computers and Technology, 23.06.2019 21:50, Trinhphuongtran
Description: write function lastfirst() that takes one argument—a list of strings of the format "lastname, firstname" —and returns a list consisting of two lists: (a) a list of all the last names (b) a list of all the first names
Answers: 2
image
Computers and Technology, 24.06.2019 08:30, 5theth
Intellectual property rights are exclusive rights that protect both the created and the creation. ipr offers exclusively what benefits to the person or people covered by it
Answers: 3
Do you know the correct answer?
Learning journal unit 3 1. copy the countdown function from section 5.8 of your textbook. def countd...

Questions in other subjects:

Konu
Chemistry, 06.10.2020 14:01
Konu
Mathematics, 06.10.2020 14:01