0% found this document useful (0 votes)
3 views1 page

Python AI Calculator Tutorial

The document presents a tutorial for designing and implementing a basic AI calculator using Python to perform arithmetic operations. It includes a program that takes two numbers as input and calculates their addition, subtraction, multiplication, division, and modulus. An example output is provided, demonstrating the calculator's functionality with sample inputs.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views1 page

Python AI Calculator Tutorial

The document presents a tutorial for designing and implementing a basic AI calculator using Python to perform arithmetic operations. It includes a program that takes two numbers as input and calculates their addition, subtraction, multiplication, division, and modulus. An example output is provided, demonstrating the calculator's functionality with sample inputs.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

TUTORIAL NUMBER 5

Name=Swayamprabha Balkrishna Badade


PRN=B24CE1091
Class=CE2

PROBLEM STATEMENT : Design and impliment a basic AI calculator using


python that can perform arithmetic opertions.

Program:
num1=int(input("Enter first number:"))
num2=int(input("Enter second number:"))

add=num1+num2
print("Addition of",num1,"and",num2,"is",add)

subtration=num1-num2
print("Subtraction of",num1,"and",num2,"is",subtration)

multiply=num1*num2
print("Multiply of",num1,"and",num2,"is",multiply)

division=num1/num2
print("Division of",num1,"and",num2,"is",division)

modulus=num1%num2
print("Modulus of",num1,"and",num2,"is",modulus)

Output:
Enter first number:6
Enter second number:3
Addition of 6 and 3 is 9
Subtraction of 6 and 3 is 3
Multiply of 6 and 3 is 18
Division of 6 and 3 is 2
Modulus of 6 and 3 is 0

You might also like