geekcomputers / geekcomputers/Python
Conditionals
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 35.4k
- Forks
- 12.9k
- Avg merge
- 2h 37m
- Merged PRs (30d)
- 1
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the conditional exercise and the two provided integer variables in the issue. Verify the program with several different assignments, including cases where either number is a factor and cases where neither is; it is done when it prints exactly "Factors!" only for the former cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100