Python 3 Programming Tutorial - Try and Except error Handling

Python 3 Programming Tutorial - Try and Except error Handling

sentdex

9 лет назад

114,639 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Adonis Edmund Tafadzwa Muzata
Adonis Edmund Tafadzwa Muzata - 29.10.2019 16:41

You are a cool guy

Ответить
SSSm0kin 24-7
SSSm0kin 24-7 - 06.12.2018 15:34

I'm like number 816

Ответить
prod.treyxoldd
prod.treyxoldd - 24.11.2018 20:32

Sentdex can you help me setup my hacking group retr0sec

Ответить
prod.treyxoldd
prod.treyxoldd - 24.11.2018 08:25

Sentdex you are the best

Ответить
shantam bajpai
shantam bajpai - 05.10.2018 17:06

Brilliant lectures mate.

Ответить
Kisuke323
Kisuke323 - 30.07.2018 16:25

how does he get 'pink' is not on the list? I have only "continuing". Absolute beginner.

Ответить
GW Brown
GW Brown - 30.07.2018 01:12

So I tried to set up data validation to test to see if the user input was a valid int or float. The only way I got it to work was with the try / except. I even tried the isinstance to return true or false but because user input is automatically set as string it didnt work. Any help would be great, as of right now I'm converting the user I put into float and doing the try except on the value error because letters cant be converted to float.

Ответить
Hellomynamesolly
Hellomynamesolly - 15.06.2018 13:09

@Sentdex please post your ERC20 address up. Your videos are some of the most helpful and comprehensive education tools I've come across and you deserve to be rewarded :)

Ответить
Kurisu
Kurisu - 28.12.2017 05:54

mr. sentdex why did you choose win 10, i like win 8.1 better though

Ответить
Abuzar Rahman
Abuzar Rahman - 09.12.2017 16:07

How to make a csv file?

Ответить
Steve
Steve - 23.11.2017 05:04

Everything works fine till I add the if, else. After that the problem is if I enter say GreeN even though we have
the whatColor.lower()) to allow the use of upper case or lower case, it doesn't work for me. Again when I
use the if else, other wise it all works fine. Any help as to why?

Ответить
mango_
mango_ - 19.11.2017 17:23

Hello, Sentdex, do you know why excepton function in the code write as below cannot work? I input word not in the list, however, there is no exception posted. Thank you.

y=["s","A","siri","b","a"]
try:
word=input("input the word you want:\n")
if word in y:
indexof=y.index(word)
print(word)
# else:
# print("word not in the list")
except Exception as e:
print(e)

Ответить
aaron siew
aaron siew - 09.11.2017 16:48

May I know what is the meaning of e?sorry, I'm new in python.

Ответить
Bruce xing
Bruce xing - 19.09.2017 04:00

are you Snowden? or his tiwn brother.

Ответить
Zed
Zed - 29.08.2017 15:22

can you use a ide with a darker theme? just like pycharm or sublime. because the white theme of your ide makes my eyes burn, probably not just me

Ответить
B
B - 27.07.2017 15:25

can you make a VIDEO about assertion please.

Ответить
Mohammad Ummair
Mohammad Ummair - 15.07.2017 19:24

my python program shows "inconsistent use of tabs and spaces in indentation" please help!

Ответить
flgliderpilot
flgliderpilot - 20.06.2017 22:44

explained it wrong though. it's not that it won't throw the exception, it's that it won't catch the exception.

Ответить
GPC™
GPC™ - 04.06.2017 02:30

except(OverflowError, ValueError):

except TypeError:

except AttributeError:
...

Ответить