Block review

a ≤ b < c

Report true if b is in the half-open interval [a, c) and false otherwise.

a divisible by b

Report true if a is divisible by b and false otherwise.

even? n

Report true if n is even and false otherwise.

odd? n

Report true if n is odd and false otherwise.

can sleep in weekend vacation

Report true if you can sleep in based on two inputs: weekend is a Boolean that tells you whether today is a weekend day and vacation is a Boolean that tells you whether today is a vacation day. Report false otherwise.

divisors of n

Report a list of the divisors of n.

(The divisors of n are the numbers between 1 and n, inclusive that evenly divide n.)

number of divisors of n

Report the number of unique divisors of n.

is prime n

Report true if n is a prime number (only divisible by 1 and itself) and false otherwise.

primes below n

Report the number of primes less than n.

ask q

Write a reporter block that asks a question and then reports the answer.

ask for number q

Write a reporter block that asks a question repeatedly until the user enters a number then report the number they answered.