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
476 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,880 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,720 points
1,304 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,440 points
537 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,450 points
473 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 7, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 4,051 views
0 votes
1 answer
+5 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,790 points
3,468 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,880 points
423 views
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP