Question: python:Objects and Sharing a) Describe how the following code works and state the mechanism it uses: n = None while n is None: try: s
python:Objects and Sharing
a) Describe how the following code works and state the mechanism it uses:
n = None while n is None: try: s = input("Enter an integer: ") n = int(s) except ValueError: print("%s is not an integer." % s)
b) In the above code, why is it better to use ValueError, rather than Exception? c) An approach to sharing code is publishing notebooks. Describe this approach and how it can help the research community
d) Another approach to sharing code is publishing packages. Describe this approach and how it impacts reproducibility
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
