02-16-2021 08:02 AM
Hello,
I dont really understand subtask 2 and how i should do it.
Thanks for help 🙂
Solved! Go to Solution.
02-16-2021 08:09 AM
Hi KleinNeko,
@KleinNeko wrote:
I dont really understand subtask 2 and how i should do it.
Read the explanation using this "external link" to understand the task!
02-16-2021 08:21 AM
02-16-2021 09:00 AM
First, let's look at the requirements for Attribute 1. It states the LED should be on if the number is between 10 and 100 AND is even (ie has a divisor of 2). Is the "between" inclusive or exclusive (do we count 10 and 100)? You definitely should not be using the Multiply here. Since you are testing for an even value, you should by trying to divide by 2 using Quotient & Remainder and seeing if the remainder is 0. You should AND this result with the In Range & Coerce result. The result of the AND should be wired straight to the terminal.
Now the second attribute. Use a loop with shift registers. The idea being that you use Quotient & Remainder to divide by 10. Each time you divide, the remainder will be from the 1's place and the quotient will be everything else. So you can loop until the quotient is 0 or until the previous remainder is different from the current remainder. While the result of the equality check to Attribute 2.
02-16-2021 09:08 AM
@crossrulz ha scritto:
While the result of the equality check to Attribute 2.
crossrulz meant: "Wire the result of the equality check to Attribute 2." 😉