Hello Guys!! This is a computer science question
Rekha and Asmin are playing a game. They will each pull out a card from a pile that has values from 1 to 13 in turn. The person who has the highest total after 5 turns wins the game. Draw a flowchart for this situation.
Answers
Here's a sample flowchart for the game Rekha and Asmin are playing:
rust
Copy code
Start
|
|----> Initialize player 1's score to 0
|----> Initialize player 2's score to 0
|
|----> Loop for 5 rounds
| |
| |----> Player 1 draws a card and adds to score
| |----> Player 2 draws a card and adds to score
| |
| |----> End loop
|
|----> Compare player 1's score to player 2's score
| |
| |----> Player 1 wins
| | |
| | |----> Print "Player 1 wins!"
| | |
| | |----> End
| |
| |----> Player 2 wins
| | |
| | |----> Print "Player 2 wins!"
| | |
| | |----> End
| |
| |----> Tie
| | |
| | |----> Print "It's a tie!"
| | |
| | |----> End
| |
| |
| |----> End
|
End