Question
In a bucket, there are balls of four different colours Red, Green, Blue and Orange. A student can pick up two balls from the bucket.
In a bucket, there are balls of four different colours Red, Green, Blue and Orange. A student can pick up two balls from the bucket. There are some conditions which must be checked when picking up the balls. Draw a flowchart which can take the colour of the first ball as an input and print the colour of the second ball that can be picked up next. The conditions are as follows: > If you first pick a Red ball, you can pick a Green one next. > If you first pick a Green ball, you can pick a Blue one next. > If you first pick an Orange ball, you can pick a Blue one next. > If you first pick a Blue ball, you can pick any ball other than a Blue one next. Also, write the algorithm corresponding to the flowchart you prepare.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started