-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conditionals #269
Comments
Answer: For Python.mystery_int_1 = int() mystery_int_1 = input("Enter a Number:") if mystery_int_1 % mystery_int_2 == 0 or mystery_int_2 % mystery_int_1 ==0: |
Answer by Python.
|
In this the variables are assigned the value which you have given and hence the code: mystery_int_1, mystery_int_2 = 7, 2 But if the user wants to enter the number then the code would be : mystery_int_1, mystery_int_2 = int( input("")), int(input("")) |
Please can you help solve this in Python and explain to me
mystery_int_1 = 7
mystery_int_2 = 2
You may modify the lines of code above, but don't move them! When you Submit your code, we'll change these lines to assign different values to the variables.
The variables below hold two integers, mystery_int_1 and
mystery_int_2. Complete this program below such that it
prints "Factors!" if either of the numbers is a factor of the other. If neither number is a factor of the other, do not print anything.
Hint: You can do this with just one conditional statement
by using the logical expressions (and, or, and not). You'll also use the modulus operator
Please help me with the Add your code here!
Have tried several means am just not getting it
The text was updated successfully, but these errors were encountered: