1. Ask the user to enter two numbers

1. Display the result of the addition, multiplication, division, subtraction, Modulus, Floor division, and Exponent for these two numbers

2. If the result of any mathematical calculation equal 2 print the multiplication time table for it by using loop statement.

Nov 29, 2020 in Python 395 views

## 1 answer to this question.

Hello @ Anee,

Code:

```num1 = int(input("Enter First Number: "))
num2 = int(input("Enter Second Number: "))

print("Enter which operation would you like to perform?")
ch = input("Enter any of these char for specific operation +,-,*,/: ")

result = 0
if ch == '+':
result = num1 + num2
if result == 2:

//run your for loop for result

elif ch == '-':
result = num1 - num2

if result == 2:

//run your for loop for result

elif ch == '*':
result = num1 * num2

if result == 2:

//run your for loop for result

elif ch == '/':
result = num1 / num2

if result == 2:

//run your for loop for result

else:
print("Input character is not recognized!")

print(num1, ch , num2, ":", result)```
• 82,860 points

## Can someone help me understand timedelta in Python?

Because timedelta is defined like: class datetime.timedelta([days,] [seconds,] ...READ MORE

## HI Mr / Mrs I have problem with my jupiter notebook when i try to learn Your video about Machine Learning. Can You help me please ?

Hi@Herlambang, I think you have a 32-bit system. ...READ MORE

## I'm a beginner in computer science world cause I have done engg in EEE, would you please help me that What should I learn after learning python to become a developer?

Since you are an EEE I think ...READ MORE

## how can i randomly select items from a list?

You can also use the random library's ...READ MORE

+1 vote

## how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

## Lowercase in Python

You can simply the built-in function in ...READ MORE