A user is using Blockly to program a process to find the next 100 prime numbers after 2. Which block is best used for the task?

IT Questions BankCategory: IoT Connecting ThingsA user is using Blockly to program a process to find the next 100 prime numbers after 2. Which block is best used for the task?

A user is using Blockly to program a process to find the next 100 prime numbers after 2. Which block is best used for the task?

  • FOR block
  • WHILE block
  • PRIME block
  • IF-THEN block

Explanation: FOR loop blocks are used to repeat the execution of a specific block of code for a specific number of times. It is best used if the number of repetitions is known. In this case, the repetition number is 100. The FOR block can execute 100 times, each time to find a prime number. After 100 prime numbers are found, the FOR block will stop the execution.

Exam with this question: IoT Connecting Things 2.0 – Chapter 3 Quiz Answers

Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments