Answer to Question #185485 in Python for FORTUNE AIDOO

Question #185485

From Answer to Question #185194 in Python for FORTUNE AIDOOAnswers>Programming & Computer Science>Python and Answer to Question #185135 in Python for FORTUNE AIDOO

Answers><span itemprop="name">Programming &amp; Computer Science</span>>Python

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.

  • An explanation of your choice for what to call for input of zero.
1
Expert's answer
2021-04-26T14:49:51-0400
from click._compat import raw_input

try:
    input = raw_input("Please enter the value to check")
except NameError:
    pass

a = raw_input('Please enter the username : ')
print ('Username : ', a)

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!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS