Script
#!/usr/local/bin/python3.1
integer1 = input('Enter the first number: ')
integer2 = input('Enter the second number: ')
if (int(integer2) % int(integer1)) == 0:
print('The second number is a multiple of the first number.')
else:
print('The second number is NOT a multiple of the first number.')
#!/usr/local/bin/python3.1
integer1 = input('Enter the first number: ')
integer2 = input('Enter the second number: ')
if (int(integer2) % int(integer1)) == 0:
print('The second number is a multiple of the first number.')
else:
print('The second number is NOT a multiple of the first number.')
Execution
Enter the first number: 12
Enter the second number: 117
The second number is NOT a multiple of the first number.
Enter the first number: 12
Enter the second number: 118
The second number is NOT a multiple of the first number.
Enter the first number: 12
Enter the second number: 119
The second number is NOT a multiple of the first number.
Enter the first number: 12
Enter the second number: 120
The second number is a multiple of the first number.
No comments:
Post a Comment