Answers for "find the error and rectify it.(python except Small_ValueError: print("You Entered small number,please try again") except Large_ValueError: print("You Entered large number,please try again") print("You Entered correct number!! in ",count,"Attempts")"

0

find the error and rectify it.(python except Small_ValueError: print("You Entered small number,please try again") except Large_ValueError: print("You Entered large number,please try again") print("You Entered correct number!! in ",count,"Attempts")

class Small_ValueError(Exception): 
     pass  
     class Large_ValueError(Exception): 
         pass
guess_number = 7
count = 0
while True:
    try: 
        ch = int(input("Enter the number: "))
        count = count + 1
        if ch < 7: 
            raise Small_ValueError
        elif ch > 7: 
                raise Large_ValueError
                break
               except Small_ValueError:
            print("You Entered small number,please try again")
            except Large_ValueError: 
                print("You Entered large number,please try again")
                print("You Entered correct number!! in ",count,"Attempts")
Posted by: Guest on January-30-2021
-1

find the error and rectify it.(python except Small_ValueError: print("You Entered small number,please try again") except Large_ValueError: print("You Entered large number,please try again") print("You Entered correct number!! in ",count,"Attempts")

class Small_ValueError(Exception): 
     pass  
     class Large_ValueError(Exception): 
         pass
guess_number = 7
count = 0
while True:
    try: 
        ch = int(input("Enter the number: "))
        count = count + 1
        if ch < 7: 
            raise Small_ValueError
        elif ch > 7: 
                raise Large_ValueError
                break
except Small_ValueError: 
  print("You Entered small number,please try again") 
  except Large_ValueError: 
    print("You Entered large number,please try again") 
    print("You Entered correct number!! in ",count,"Attempts")
Posted by: Guest on January-30-2021

Code answers related to "find the error and rectify it.(python except Small_ValueError: print("You Entered small number,please try again") except Large_ValueError: print("You Entered large number,please try again") print("You Entered correct number!! in ",count,"Attempts")"

Python Answers by Framework

Browse Popular Code Answers by Language