Please use your Python system (IDLE or something else) to compute the following. Be prepared to show your work!
Answer: (b). For (a), input() returns a string, not an integer. Choice (c) has the right idea, but you have the input and int reversed. As the prompt isn’t a string that represents an integer, the int() will fail, and the input() will never be executed. Choice (d) will work, but the str() is unnecessary as input() returns a string. So you should omit it, and that’s choice (b).
|
MHI 289I, Programming for Health Informatics Version of October 12, 2020 at 10:51PM
|
You can also obtain a PDF version of this. |