Computer Science, asked by degela, 1 year ago

program in python write it and show me the output of that program

Attachments:

Answers

Answered by rakeshchennupati143
2

Program:

def find_product(num1,num2,num3):

  product=0

  if(num1==7):

      if(num2==7):

          if(num3==7):

              product = -1

          else:

              product = num3

      else:

          if(num3==7):

              product = -1

          else:

              product = num2*num3

  else:

      if(num2==7):

          if(num3==7):

              product = -1

          else:

              product = num3

      else:

          if(num3==7):

              product = -1

          else:

              product = num1*num2*num3    

  return product

a = int(input("Enter 1st number"))

b = int(input("Enter 2nd number"))

c = int(input("Enter 3rd number"))

product=find_product(a,b,c)

print(product)

Output:

Enter 1st number7

Enter 2nd number6

Enter 3rd number2

12

-----hope this helps :)

Answered by moshnetic
0

Answer:

I have attached picture of code and also result because I couldn't paste code here as Brainly doesn't allow indentations :)

Please see the code picture and type it in your text editor, then run it in Command Line

Cheers :)

Attachments:
Similar questions