Determining the Multiplication of Python Beginner n

Asked 2 years ago, Updated 2 years ago, 15 views

python

2022-09-21 10:13

2 Answers

I'll just give you a hint.

print(184 % 3 == 0) # False
print(184 % 4 == 0) # True


2022-09-21 10:13

import random as r


x = r.randint(1,300)
n = input ("Enter n of the multiple of n of the random function: ")
y = int(n)


print(x, "%", y, "=")
a = input ("x is a multiple of y?")
b = int(x)


if b % y  == 0:
    print(") is a multiple of y.")
else:
    print("Wrong answer!) The number entered is not a multiple of y")


2022-09-21 10:13

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.