Home / MCQ Bank / Computer
Computer Functions In Python

What will be the output of the following Python code? def f(p, q, r): global s p = 10 q = 20 r = 30 s = 40 print(p,q,r,s) p,q,r,s = 1,2,3,4 f(5,10,15)

Select the best option to verify your answer:
Show Correct Answer
Correct Answer: Option C • 10 20 30 40

Related Computer Questions

______ function is used to apply an expression for a given dataset. Property which allows to produce different executable for different platforms in C is called? What will be the output of the following Java program? import java.util.*; class Linkedlist { public static void main(String args[]) { LinkedList obj = new LinkedList(); obj.add("A"); obj.add("B"); obj.add("C"); obj.removeFirst(); System.out.println(obj); } } What will be the output of the following C# code? public static void Main() { byte varA = 10; byte varB = 20; long result = varA | varB; Console.WriteLine("{0} OR {1} Result :{2}", varA, varB, result); varA = 10; varB = 10; result = varA | varB; Console.WriteLine("{0} OR {1} Result : {2}", varA, varB, result); } What will be the output of the following Java program? class box { int width; int height; int length; int volume; void volume() { volume = width*height*length; } } class Output { public static void main(String args[]) { box obj = new box(); obj.height = 1; obj.length = 5; obj.width = 5; obj.volume(); System.out.println(obj.volume); } }