Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

program called Numbers . The program will ask a user to enter two numbers - x and y . The program should print True

program called Numbers. The program will ask a user to enter two numbers - x and y.

The program should print "True" if:

  • value of x or value of y is 81,
  • or sum of x and y is 81
  • or the value of x raised to the power of y is 81

Otherwise, your program should print "False"

Example:

  • Enter a first number: 81
  • Enter a second number: 5
  • Output: True
  • Enter a first number: 60
  • Enter a second number: 81
  • Output: True
  • Enter a first number: 70
  • Enter a second number: 11
  • Output: True
  • Enter a first number: 3
  • Enter a second number: 4
  • Output: True
  • Enter a first number: 10
  • Enter a second number: 15
  • Output: False

Step by Step Solution

There are 3 Steps involved in it

Step: 1

mainpy 1 Define the function to check the conditions 2 def checknumbersx y 3 if x 81 or y 5 else ... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introduction to Java Programming, Comprehensive Version

Authors: Y. Daniel Liang

10th Edition

133761312, 978-0133761313

More Books

Students also viewed these Programming questions