A Python Function
A Python Function
# return their product only if the product is equal to or lower than 1000.
# Otherwise, return their sum.
def product_or_sum():
num1 = int(input('enter the first number: '))
num2 = int(input('enter the second number: '))
if num1 * num2 <= 1000:
print(num1*num2)
else:
print(num1+num2)
product_or_sum()
password()
# Create a Python program to check if the number is divisible by both 5 and 7 or not.
# For example: input: 35 output: the number is divisible by 5 and 7.
# Input: Get the number from the user
num = int(input('enter a number: '))
if num % 5 == 0 and num % 7 == 0:
print('The number is divisible by 5 and 7.')
else:
print('The number is not divisible by both 5 and 7.')