Custom Exception : Python tutorial 211

preview_player
Показать описание
I love you guys .
Thanks for watching this video.
Рекомендации по теме
Комментарии
Автор

Might be a helpful code>>>

def divide(a, b):
try:
return a/b
except ZeroDivisionError as error:
print(error)
except TypeError as Error:
print(error)
except:
print('Unknown error')
else:
return a/b

def Value1():
a = int(input("Enter value 1: "))
return a
def Value2():
b = int(input("Enter value 2: "))
return b

while True:
try:
a = Value1()
b = Value2()
c = a/b
except:
print('Error re-input')
else:
break

c = divide(a, b)
print(c)

kanwaradnanrajput
Автор

Bro, add more videos. You told that this tutorial will go upto approx 36 chapters but this is just approx 17. Add more video

mdshoaib
Автор

can anybody help me :

released = {
"iphone" : 2007,
"iphone 3G" : 2008,
"iphone 3GS" : 2009,
"iphone 4" : 2010,
"iphone 4S" : 2011,
"iphone 5" : 2012
}

for item in released:
if "sdfsfas 5" in released:
print ("Key found")
break
else:
print("not found")

how can i break the loop if the condition is not true

anujtiwari
Автор

Sir Can You Make Video On Android Development Using Python ; Kivy ????

anandranjan
Автор

yar is ko browser per b run ker k demo dekhao

imransafdar
Автор

#answer:- Sir aapne 38 chapter upload krne ko bola tha 1st video me or abhi aapne only 17 chapters hi upload kiye hai baki ke videos kb upload kroge sir

KrishnaGupta-pzig
Автор

sir task bhi diya krye ap take kch pta lgye k kiya ata hai hum ko???? and ap ka koi contact num hai to btye i'm new

khanmohammad
Автор

Email Logging Code:: (Also displays user's name)

class ShortNameError(ValueError):
pass

def validate(password):
if len(password) < 8:
raise ShortNameError('Password is short enter a password more than 8 characters')



def AccountName(gmail):
pos = gmail.find('@')
return gmail[0:pos].title()

gmail = input('Enter your gmail: ')
pw = input("Enter your gmail's password: ")
validate(pw)
AccountName(gmail)
print('')
print()
print(f"Welcome {AccountName(gmail)} to your account...")

kanwaradnanrajput
Автор

Bhai koi Aisa upai batao n ki Python Shikhne me boring n lage Bhai samjh nhi Aa rha hai python plz help me bro

prakashraj
Автор

bhai dusron ki content copy mat kiya kar
I know you copied from the channel real python as he gave the same example earlier than you
btw:those who do not believe me can check out his channel also, I am not telling a lie.

Dr.SouravBiswas
visit shbcf.ru