Any help is appreciated. I was able to get it to print to the log, but I received the bound method error. I think it has something to do with my + str in my exception handling
def main():
“”“This function controls the main thread of the program.”""
print(‘Please enter a floating point value’)
response = input()
try:
max_counter = int(response)
except ValueError:
error_message()
else:
if max_counter <= 0:
error_message()
else:
Leibniz_object = MarshallHomework6.Pi_LeibnizClass(10)
#Collect the number from the user to use for the radius
print (‘Please enter your radius number: ‘)
response = input()
try:
max_counter = float(response)
except ValueError:
print(‘You have entered an invalid value. You must enter a positive floating point value or an integer.’)
print (‘Please restart the program and try again.’)
else:
Leibniz_object = MarshallHomework6.Pi_LeibnizClass(10)
logging.basicConfig(filename=‘example.log’,
format=’%(asctime)s %(levelname)s: %(message)s’,
level=logging.INFO)
msg1 = 'The circumference of circle is: ’ + str(Leibniz_object.get_circumference)
logging.info(msg1)
msg2 = 'The area of a circle is: ’ + str(Leibniz_object.get_area)
logging.info(msg2)
msg3 = 'The volume of a circle is: ’ + str(Leibniz_object.get_volume)
logging.info(msg3)
msg4 = 'The surface area of a circle is: ’ + str(Leibniz_object.get_surfacearea)
logging.info(msg4)
ending()