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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!