Computer Science, asked by rajuchandra1212, 2 months ago

If... Then... and if... Then ... Else Statement.

Answers

Answered by manjunathmanish36
0

Answer:

in python if else statements

example: make a calculator using if else and variables.

solution :

number = input("enter our first number ")

operator = input("enter your operator ( + - / *) " )

second = input("enter your second number ")

int(first)

int(second)

if operator == "+":

print(first + second)

elif operator == "-":

print(first - second)

elif operator == "/":

print(first / second)

elif operator == "*":

print(first * second)

else:

print("invalid operation")

Similar questions