F&A Diskussionen
ValueError won’t work
0 Stimmen
3 Antwortenprint(1)
raise ValueError
print(2)
0 Stimmen
1 AntwortПочему выдается ошибка?
2 Stimmen
3 AntwortenRaise?
0 Stimmen
3 AntwortenPython HELP
1 Stimme
17 AntwortenWhy this code does not run?
0 Stimmen
1 Antwortdef manipulate_data(n):
positives,negatives=[],[]
if not isinstance(n,list):
raise ValueError
return
else:
for i in n:
if i>=0:
positives.append(i)
if i<0
negatives.append(i)
new=[len(positives,sum(negatives)]
return new.
Someone kindly assist I keep running it in unitests and I keep getting errors.
Here's the question:
0 Stimmen
2 AntwortenWhat am I doing wrong?
0 Stimmen
3 AntwortenHey there,
I don't know why, but when I import tkinter on IDLE like this:
from tkinter import *
And I say:
window = Tk()
Even known I use python 3.2.5, which should be able to use Tkinter, the python shell raises a ValueError that says that Tk() is not defined. I am very sure I use python 3.2.5 and tutorials from the Python Foundation say that is what I have to do. But it still doesn't work.
Does anyone have an idea of how to solve this problem? Thank you!
0 Stimmen
3 AntwortenHeute heiß
New code
1 Votes
How would you solve the part of the C# Intermediate code project that requires operator overloading?
0 Votes
Hello Everyone
0 Votes