im a newbie here in python and in this forum site. im using python 2.7.1. and im making a simple calculator that can trap if the second input is zero in division 0peration..
is it possible to call def to def within the if-else statement where ?? because im trying to show an another tkinter with label that shows that it is an error in division operation..
snippetGirl
0
Newbie Poster
Recommended Answers
Jump to PostIt is legal to define local functions that are effectively invisible outside the outer function. But I doubt that is what you mean? I think you are trying to say something about program flow. To "trap" an illegal division, I would raise an exception, and handle it in the main …
All 2 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.