What will be the output of the following programs:- (a) REM * Any Two Number INPUT P INPUT Q PRINT P*Q (b) INPUT "NAME:";A$ PRINT "U R 2";"SWEET",A$ PRINT "SORRY". (c) INPUT X,Y Z=X/Y R=X+Y PRINT Z,R (d)INPUT B PRINT B,B*2,B*3 PRINT B*4,B*5,B*6
Answers
Answer:
Output for the given program
Explanation:
From the above question,
They have given :
Here we have to find the output for the given program:
(a) REM * Any Two Number INPUT P INPUT Q PRINT P*Q
(b) INPUT "NAME:";A$ PRINT "U R 2";"SWEET",A$ PRINT "SORRY".
(c) INPUT X,Y Z=X/Y R=X+Y PRINT Z,R
(d)INPUT B PRINT B,B*2,B*3 PRINT B*4,B*5,B*6
(a) REM * Any Two Number INPUT P INPUT Q PRINT P*Q
OUTPUT:
P = int(input("Enter the first number: "))
Q = int(input("Enter the second number: "))
print("The product of the two numbers is:", P*Q)
(b) INPUT "NAME:";A$ PRINT "U R 2";"SWEET",A$ PRINT "SORRY".
OUTPUT:
U R 2 sweet, NAME:
(c) INPUT X,Y Z=X/Y R=X+Y PRINT Z,R
OUTPUT:
The output is: Z = X/Y, R = X+Y
(d)INPUT B PRINT B,B*2,B*3 PRINT B*4,B*5,B*6
OUTPUT:
If the input B is 10, the output will be:
10 20 30 40 50 60
For more such related questions : https://brainly.in/question/18360726
#SPJ1