#Mastery<\/a>29<\/span><\/p>\n #TC<\/a>1014<\/span><\/p>\n This is very useful since it helps to make a good and clean code without too many errors to fix, for example:<\/span><\/p>\n while\u00a0 True:<\/strong> \u00a0<\/p>\n while q \u00a0<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":" #Mastery<\/a>29<\/span><\/p>\n
\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 try:<\/strong>
\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 q=int(input(“Please enter a non-negative integer number: “))<\/strong>
\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 break<\/strong>
\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 except ValueError:<\/strong>
\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 print(“this is not a integer number, try again: “)<\/strong><\/p>\n
\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 try:<\/strong>
\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 q=int(input(“this is not a positive number,try again: “))<\/strong>
\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 except ValueError:<\/strong>
\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 print (“this is not a integer number, try again:\u00a0 “)<\/strong>
\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 while True:<\/strong>
\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 try:<\/strong>
\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 q=int(input(“Please enter a non-negative integer number: “))<\/strong>
\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 break<\/strong>
\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 except ValueError:<\/strong>
\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 print (“this is not a integer number, try again: “<\/strong>)<\/strong><\/p>\n