Skip to main content

Exceptions Hackerrank Solution in Python3

for i in range(int(input())):
try:
a,b = map(int,input().split())
c = a // b
print(c)
except ZeroDivisionError as e:
print("Error Code:", e)
except ValueError as e:
print("Error Code:", e)

Comments

  1. 옸가능 옸가능 가능 가입 머니 - Casinooland 우리카지노 우리카지노 카지노 카지노 108São Paulo v Indonesia, Best Betting Odds - THTbet

    ReplyDelete

Post a Comment

Popular posts from this blog

Breaking the Records Hackerrank solution in C

#include< stdio.h > int main() { int n,i,a[ 1000 ],x= 0 ,mn= 0 ; scanf( "%d" ,&n); for (i= 0 ;i<n;i++) { scanf( "%d" ,&a[i]); } int min=a[ 0 ],max=a[ 0 ]; for (i= 0 ;i<n;i++) { if (min>a[i]) { min=a[i]; mn++; } } for (i= 0 ;i<n;i++) { if (max<a[i]) { max=a[i]; x++; } } printf( "%d %d" ,x,mn); return 0 ; }