Computer Science, asked by shailrai433, 9 months ago

Rahim is writing a scratch program . he has to check for a condition and perform an action according to the applicable condition. which condition should he use from the control block?​

Answers

Answered by kkiranjot55
0

answer below

Explanation:

Introduction

Conditional statements check whether a programmer-specified Boolean condition is true or false. They make it possible to test a variable against a value/compare a variable with another variable and make the program act in one way if the condition is met, and another if it isn’t. They make the program very powerful and be able to be used for a vast variety of purposes, from creating simple calculators to controlling robots. A program that has conditional statements is called a Conditional Program, and the process is known as Conditional Programming.

For example, if a bulb is not working, you first check whether the switch is ON or OFF. If the switch is OFF you turn on the bulb, but if the switch is ON and bulb is not working, you replace the bulb or check connection. You act according to the situation or condition.

You can represent the same thing using a flowchart:

Flow Chart Bulb

Flowcharts are used while designing and documenting simple processes or programs. They help visualise what is going on and thereby help understand a process, and perhaps also find flaws, bottlenecks, and other less-obvious features within it. It is recommended to make a flowchart for every project before you start writing the script.

Similar questions