Sasha just loves the number 7 and considers it lucky. She loves it so much that she has a formula to understand if a pair of numbers are lucky are not.
If any or both of the numbers are 7, then the pair is lucky
If the sum of the numbers is 7, then the pair is lucky
If the absolute difference of the 2 numbers is 7, then the pair is lucky
Answers
Answered by
1
Answer:
If any or both of the numbers are 7, then the pair is lucky
If the sum of the numbers is 7, then the pair is lucky
If the absolute difference of the 2 numbers is 7, then the pair is lucky
Answered by
0
Answer:def solve(num1,num2):
# write your code from here
if num1==7 or num2==7 :
print("Lucky!")
elif (num1+num2)==7:
print("Lucky!")
elif (abs(num1-num2))==7:
print("Lucky!")
else:
print("Not Lucky!")
Explanation:
Similar questions