subject

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.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 10:40
Nims is applicable to all stakeholders with incident related responsibilities. true or false
Answers: 1
question
Computers and Technology, 22.06.2019 14:20
Consider a byte-addressable computer with 16mb of main memory, a cache capable of storing a total of 64kb of data and block size of 32 bytes. (a) how many bits in the memory address? (b) how many blocks are in the cache? (c) specify the format of the memory address, including names and sizes, when the cache is: 1. direct-mapped 2. 4-way set associative 3. fully associative
Answers: 2
question
Computers and Technology, 23.06.2019 05:20
Which operating system is a version of linux?
Answers: 1
question
Computers and Technology, 23.06.2019 12:00
From excel to powerpoint, you can copy and paste a. cell ranges and charts, one at a time. b. cell ranges and charts, simultaneously. c. charts only. d. cell ranges only.
Answers: 3
You know the right answer?
Learning journal unit 3 1. copy the countdown function from section 5.8 of your textbook. def countd...
Questions
question
Mathematics, 12.03.2021 17:50
question
Mathematics, 12.03.2021 17:50
question
History, 12.03.2021 17:50