# What will be the output of the following Python function def f(p, q): return p%q f(0, 2) f(2, 0)

1.  0 0

2.  Zero Division Error Zero Division Error

3.  0 Zero Division Error

4.  Zero Division Error 0

4
```0
Zero Division Error```

Explanation :
No Explanation available for this question

# What will be the output of the following Python code def f(x): def f1(a, b): print("hello") if b==0: print("NO") return return f(a, b) return f1 @f def f(a, b): return a%b f(4,0)

1.  hello NO

2.  hello Zero Division Error

3.  NO

4.  hello

4
```hello
NO```

Explanation :
No Explanation available for this question

# What will be the output of the following Python code def f(x): def f1(*args, **kwargs): print("*"* 5) x(*args, **kwargs) print("*"* 5) return f1 def a(x): def f1(*args, **kwargs): print("%"* 5) x(*args, **kwargs) print("%"* 5) return f1 @f @a def p(m): print(m) p("hello")

1.  *****%%%%%hello%%%%%*****

2.  Error

3.  *****%%%%%hello%%%%%*****

4.  hello

4

*****
\%\%\%\%\%
hello
\%\%\%\%\%
*****

Explanation :
No Explanation available for this question

# The following python code can work with ____ parameters. def f(x): def f1(*args, **kwargs): print("Sanfoundry") return x(*args, **kwargs) return f1

1.  2

2.  1

3.  any number of

4.  0

4

any number of

Explanation :
No Explanation available for this question

# What will be the output of the following Python code def f(x): def f1(*args, **kwargs): print("*", 5) x(*args, **kwargs) print("*", 5) return f1 @f def p(m): p(m) print("hello")

1.  ***** hello

2.  ***** ***** hello

3.  *****

4.  hello

4

hello

Explanation :
No Explanation available for this question

# A function with parameters cannot be decorated.

1.  True

2.  False

2

False

Explanation :
No Explanation available for this question

# Identify the decorator in the snippet of code shown below. def sf(): pass sf = mk(sf) @f def sf(): return

1.  @f

2.  f

3.  sf()

4.  mk

4

mk

Explanation :
No Explanation available for this question

# What will be the output of the following Python code class A: @staticmethod def a(x): print(x) A.a(100)

1.  Error

2.  Warning

3.  100

4.  No output

4

100

Explanation :
No Explanation available for this question

# What will be the output of the following Python code def d(f): def n(*args): return '\$' + str(f(*args)) return n @d def p(a, t): return a + a*t print(p(100,0))

1.  100

2.  \$100

3.  \$0

4.  0

4

\$100

Explanation :
No Explanation available for this question

1.  4

2.  3

3.  0

4.  1

4