Computer Science, asked by ajaysab29, 1 month ago

Write a python program to accept two numbers from the user and perform basic

calculations such as addition, subtraction and multiplication.​

Answers

Answered by SparklingThunder
0

 \huge  \purple{ \underline{ \boxed{ \red{ \mathbb{ANSWER : }}}}}

  \red{\begin{array}{l} \textsf{a=int(input("Enter first number : "))} \\ \textsf{b=int(input("Enter second number : "))} \\ \textsf{def add(a,b): }\\\textsf{ \:  \:  \ print("Addition of given numbers ",a+b) }\\ \textsf{def sub(a,b): }\\ \textsf{\:  \:    \:  print("Subtraction of given numbers ",a-b) }\\ \textsf{def multi(a,b): }\\ \textsf{ \:   \ \:  print("Multiplication of given numbers ",a*b) }\\ \textsf{add(a,b)} \\ \textsf{sub(a,b)} \\ \textsf{multi(a,b)  }\\ \end{array}}

 \large \green{ \underline{ \underline{ \mathbb{KNOW  \: MORE :}}}}

 \large\orange{ \textsf{def}}

def is the keyword in python programming language used in the beginning of definition of the function . Function name is used to call anything which is defined in the definition of function.

 \large\orange{ \textsf{print}}

print is the keyword in python programming language . It print anything which is written within it .

 \large\orange{ \textsf{input}}

input takes the input from the user in the form of string .

 \large\orange{ \textsf{int}}

int converts the input into integer form .

Similar questions