NAME : SWASTIK JAIN
ClASS : VI
SECTION :B (Day School)
SUBJECT : COMPUTER
ROLL : 37
TOPIC : PYTHON
1. Write a program in Python to calculate and print the sum of
three
numbers.
A = input (“Enter the first number”)
B = input (“Enter the second number”)
C = input ("Enter the second number")
Sum: A+B+C
print ("The result is", Sum)
2. Write a program in Python to calculate and print the value of M
from
the expression below, after accepting the values of a and b from
the
user:
M= (a*a) + (b*b)
A= 10
B=5
M=(a*a) + (b*b)
print ("The result is", M)
3. Write a program in Python to accept a number and print its
square(a*a) and cube(a*a*a).
A = input ("Enter a number”)
Sq= (A*A)
CU = (A*A*A)
print ("The square is, sq) print (The cube is", CU)
4. Write a program in Python to input two numbers, divide them.
Print
the quotient and remainder
A = input ("Enter the first number")
B = input ("Enter the second number")
Q = A/B
R = A% B
print ("The Quotient", Q)
print ("The Remainder", R)
1. Write a program in Python to input two numbers,
divide them. Print the quotient and remainder
A = input ("Enter the first number")
B = input ("Enter the second number")
Q = A/B
R = A% B
print ("The Quotient",
Q) print ("The
Remainder", R)