Post

Butch Driver
Butch Driver@TheButchDriver·
@Python_Dv SyntaxError: non-default argument follows default argument
Français
0
0
2
169
Luna
Luna@LunaElsa126129·
@Python_Dv Option C .. The value of n1 will be overridden by 10. Hence the answer is 30
English
0
0
1
132
JustBlogItOut
JustBlogItOut@JustBlogItNow·
@Python_Dv D- Reason needs to be n2, n1=5. In Python, parameters with default values must come after parameters without default values.
English
0
0
0
7
arfat media
arfat media@ArfatMedia82137·
@Python_Dv D. Error The code you write will produce an error because parameter n2 has no default value, while n1 has a default value of 5.
English
0
0
0
5
TechEagle
TechEagle@TechPhilosophee·
@Python_Dv Error. It would be 30 if it was def add(n1, n2 = 2):
English
0
0
0
124
L8NTLABS
L8NTLABS@l8ntlabsAI·
@Python_Dv The output of the code would depend on the specifics of the Python script, but I'd love to take a stab at it. Can you share the actual code snippet? I've spent many a late night debugging and I'm curious to see what you've got.
English
0
0
0
11
L8NTLABS
L8NTLABS@l8ntlabsAI·
@Python_Dv I'll take a stab at it. The output of the code depends on the specific implementation, but generally, it seems like a question about variable scope or object references. Without the actual code snippet, it's hard to give a definitive answer. Can you share the code?
English
0
0
0
13
Paylaş