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

Simple Calculator in Python

The document is a simple calculator program that prompts the user to input two values, a and b. It attempts to perform basic arithmetic operations (addition, subtraction, multiplication, and division) using these values. However, there are errors in the code such as incorrect variable handling and syntax issues that need to be addressed for proper functionality.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views1 page

Simple Calculator in Python

The document is a simple calculator program that prompts the user to input two values, a and b. It attempts to perform basic arithmetic operations (addition, subtraction, multiplication, and division) using these values. However, there are errors in the code such as incorrect variable handling and syntax issues that need to be addressed for proper functionality.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

print("Simple Calculator")

a=input("Kindly enter a value for variable a")


b=input("Kindly enter a value for variable b")
print("Answer for all operations using those numbers taking a as value 1 and b as
value 2")
add=a+b
print(add)
print(Addition:)
sub=a-b
print(Subtraction:)
print(sub)
mul=a*b
print(Multiplication:)
print(mul)
div=a/b
print(Division:)
print(div)
print("All operations are complete. This calculator was made by Niharika")

You might also like