I wrote this code and now want to include Python’s exception handling using try/except to catch the error and print out a customized error message. I created a section called #Exception handling for this in the body of my code. Thanks for the help!
from math import *
def main():
#Creates entire main function.
# GUI Setup
win = GraphWin(“Circle Intersection”, 600, 300)
win.setCoords(0, 0, 600, 300)
leftScr = Rectangle(Point(0, 0), Point(300, 300))
leftScr.setFill(“peachpuff”)
leftScr.draw(win)
for i in range(0,600,):
Line(Point(0,i*10),Point(10,i*10)).draw(win)
Text(Point(15,150), “0”).draw(win).setSize(9)
#This is a circle function:
Cc =Circle(Point(150,150),4)
Cc.setFill(“white”)
Cc.draw(win)
#Information Gathering from console
Text(Point(450,280), “This Program Computes the Intersection”).draw(win).setSize(9)
Text(Point(450,260), “of a Circle with a horizontal line.”).draw(win).setSize(9)
Text(Point(400,190), “What is the Radius?: “).draw(win).setSize(9)
Text(Point(409,160), “Define the Y-Intersect (< radius)?: “).draw(win).setSize(9)
#Input
Radius = Entry(Point(520,190), 5)
Radius.setText(“0.0”)
Radius.draw(win)
yInt = Entry(Point(520,160), 5)
yInt.setText(“0.0”)
yInt.draw(win)
win.getMouse()
y = float(yInt.getText())
r = float(Radius.getText())
#This is input controls:
if r<y:
Text(Point(450,8), “ERROR: Radius < Y Intercept”).draw(win).setSize(9)
Text(Point(450,20), “Click again to Quit”).draw(win).setSize(9)
win.getMouse()
else:
#Output
yIntLine = Line(Point(0,y+150), Point(300,y+150))
yIntLine.draw(win)
C = Circle(Point(150,150),r)
C.draw(win)
#Adding Exception handling:
#Processing values for screen drawing output
Xpos = sqrt((r**2) – (y**2))
Xneg = -1 * sqrt((r**2) – (y**2))
Text(Point(400,100), “X int is:”).draw(win).setSize(9)
Text(Point(400,80), “-X int is:”).draw(win).setSize(9)
Text(Point(500,100), Xpos).draw(win).setSize(9)
Text(Point(500,80), Xneg).draw(win).setSize(9)
Cxn = Circle(Point(Xneg+150,y+150),4).draw(win).setFill(“red”)
Cxp = Circle(Point(Xpos+150,y+150),4).draw(win).setFill(“red”)
#Click to close window
Text(Point(450,20), “Click again to Quit”).draw(win).setSize(9)
win.getMouse()
#Closes the windew
win.close()
#Executes function main
main()
"Looking for a Similar Assignment? Get Expert Help at an Amazing Discount!"
I Would Recommend A Minimum Of 1 1 2 More Pages Of Explanation On How You Did Th
/in Uncategorized /by developerI would recommend a minimum of 1 1/2 more pages of explanation on how you did the problem, what the numbers mean,
and what the recommendation is.
The president of the Akron Zoo asked you to calculate the expected gate admittance figuresand revenues for both 1999 and 2000. Would simple linear regression analysis be theappropriate…
"Looking for a Similar Assignment? Get Expert Help at an Amazing Discount!"
I Would To Ask How To Solve Question In A Laboratory Centrifuge It Takes A Minim
/in Uncategorized /by developeri would to ask how to solve question: In a laboratory centrifuge, it takes a minimum of 17 min to clarify the celllysate at 12000 rpm. After 17 min, the top of the culture being centrifugedwas 32 mm and the top of the packed solids was 79 mm from the center ofrotation, respectively.Determine the maximum flow rate for the clarification of a suspension of lysedEscherichia coli cells in a plant scale disk centrifuge. Given that the plantcentrifuge has a bowl diameter of 25.4 cm, the maximum dimensionlessacceleration, G of 14200, θ = 42°, R1 = 8 cm, R0 = 20 cm and number of disks= 100.
"Looking for a Similar Assignment? Get Expert Help at an Amazing Discount!"
I Would Want To Know If There Are Any Potential Companies Or Atleast One Company
/in Uncategorized /by developerI would want to know if there are any potential companies or atleast one company that you think might be in trouble based off below
Goodwill
Current ratio
Adjusted EBITDA
plunging cashflow
offbalance sheet
Rapid expansion
"Looking for a Similar Assignment? Get Expert Help at an Amazing Discount!"
I Write A 1000 1250 Word Summary Of The Assigned Article By Palmer Et Al
/in Uncategorized /by developeri) Write a 1000-1250 word summary of the assigned article by Palmer et al. Include a description of each of the theories, their practical applications, and a reflection of or connection to your own teaching practices.
"Looking for a Similar Assignment? Get Expert Help at an Amazing Discount!"
I Write The Instruction In Word Document Ai Want To Follow The Instruction Exact
/in Uncategorized /by developerI write the instruction in word document ai want to follow the instruction exactly and i upload the resources that i need 1 – article and website the article is only 4 headline i wanted not all article
also there are 3 quotation i already choose and put it in the word docment
I write the instruction in word document and i upload the resources that i need
i need write one page and half
"Looking for a Similar Assignment? Get Expert Help at an Amazing Discount!"
I Wrote A Paper That Talks About Healthcare From Data Mining And Artefical Intel
/in Uncategorized /by developerI want to work with someone who has experience in Bioinformatics. I am going to do master thesis in this topic.
"Looking for a Similar Assignment? Get Expert Help at an Amazing Discount!"
I Wrote A Research Paper I Want Someone Checks The Paper Spilling Grammer And Ma
/in Uncategorized /by developerI wrote a research paper, I want someone checks the paper (spilling, grammer) and make sure all the ideas make sense. Also, improve the introduction and write strong conclusion and review the whole paper.
"Looking for a Similar Assignment? Get Expert Help at an Amazing Discount!"
I Wrote My Paper About Sexual Transmitted Diseases As A Current Social Problem A
/in Uncategorized /by developerI wrote my paper about Sexual Transmitted Diseases as a current social problem and I need help choosing 4 social concepts and also an analyze on how these concepts help us better understand the social problem: STD’s . (Concepts include ideas such as stratification, ethnicity, gentrification, sexism, and others linked to sociology.)
"Looking for a Similar Assignment? Get Expert Help at an Amazing Discount!"
I Wrote The Paper But Didn T Get Correct Have To Redo It
/in Uncategorized /by developerThank you so much for trying to help me! There are 2 assignments attached. I wrote the paper but didn’t get correct have to redo it.
ASSIGNMENT 08PS400Cognitive Psychology1. Two basic approaches to object recognition are the parts-based approach and the image-based approach. Describe each of these approaches, providing one…
"Looking for a Similar Assignment? Get Expert Help at an Amazing Discount!"
I Wrote This Code And Now Want To Include Python S Exception Handling Using Try
/in Uncategorized /by developerI wrote this code and now want to include Python’s exception handling using try/except to catch the error and print out a customized error message. I created a section called #Exception handling for this in the body of my code. Thanks for the help!
from math import *
def main():
#Creates entire main function.
# GUI Setup
win = GraphWin(“Circle Intersection”, 600, 300)
win.setCoords(0, 0, 600, 300)
leftScr = Rectangle(Point(0, 0), Point(300, 300))
leftScr.setFill(“peachpuff”)
leftScr.draw(win)
for i in range(0,600,):
Line(Point(0,i*10),Point(10,i*10)).draw(win)
Text(Point(15,150), “0”).draw(win).setSize(9)
#This is a circle function:
Cc =Circle(Point(150,150),4)
Cc.setFill(“white”)
Cc.draw(win)
#Information Gathering from console
Text(Point(450,280), “This Program Computes the Intersection”).draw(win).setSize(9)
Text(Point(450,260), “of a Circle with a horizontal line.”).draw(win).setSize(9)
Text(Point(400,190), “What is the Radius?: “).draw(win).setSize(9)
Text(Point(409,160), “Define the Y-Intersect (< radius)?: “).draw(win).setSize(9)
#Input
Radius = Entry(Point(520,190), 5)
Radius.setText(“0.0”)
Radius.draw(win)
yInt = Entry(Point(520,160), 5)
yInt.setText(“0.0”)
yInt.draw(win)
win.getMouse()
y = float(yInt.getText())
r = float(Radius.getText())
#This is input controls:
if r<y:
Text(Point(450,8), “ERROR: Radius < Y Intercept”).draw(win).setSize(9)
Text(Point(450,20), “Click again to Quit”).draw(win).setSize(9)
win.getMouse()
else:
#Output
yIntLine = Line(Point(0,y+150), Point(300,y+150))
yIntLine.draw(win)
C = Circle(Point(150,150),r)
C.draw(win)
#Adding Exception handling:
#Processing values for screen drawing output
Xpos = sqrt((r**2) – (y**2))
Xneg = -1 * sqrt((r**2) – (y**2))
Text(Point(400,100), “X int is:”).draw(win).setSize(9)
Text(Point(400,80), “-X int is:”).draw(win).setSize(9)
Text(Point(500,100), Xpos).draw(win).setSize(9)
Text(Point(500,80), Xneg).draw(win).setSize(9)
Cxn = Circle(Point(Xneg+150,y+150),4).draw(win).setFill(“red”)
Cxp = Circle(Point(Xpos+150,y+150),4).draw(win).setFill(“red”)
#Click to close window
Text(Point(450,20), “Click again to Quit”).draw(win).setSize(9)
win.getMouse()
#Closes the windew
win.close()
#Executes function main
main()
"Looking for a Similar Assignment? Get Expert Help at an Amazing Discount!"