can someone please help me with python

0 votes
  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 by Anee
• 120 points
44 views

1 answer to this question.

0 votes

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)
answered Nov 30, 2020 by Niroj
• 82,560 points

Related Questions In Python

0 votes
1 answer

Can someone help me understand timedelta in Python?

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

answered Jan 16, 2019 in Python by charlie_brown
• 7,780 points
658 views
0 votes
1 answer

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

answered Dec 18, 2020 in Python by MD
• 95,060 points
57 views
0 votes
1 answer

Can you help me understand the Global Interpreter Lock in Python

Suppose you have multiple threads which don't really touch ...READ MORE

answered Nov 23, 2018 in Python by aryya
• 7,420 points
140 views
0 votes
2 answers
+1 vote
2 answers

how can i count the items in a list?

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

answered Jul 6, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 1,833 views
0 votes
0 answers
+4 votes
6 answers

Lowercase in Python

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

answered Apr 11, 2018 in Python by hemant
• 5,810 points
1,416 views
0 votes
1 answer

Can someone help me make a score everytimes the "star" touch the bottom of the border?

Hello @PetesHacker , I saw you do collision detection ...READ MORE

answered Jul 30, 2020 in Python by Niroj
• 82,560 points
87 views
0 votes
1 answer