Hello I am trying to create a game using Matlab, but I have problem using while
ID: 3863123 • Letter: H
Question
Hello
I am trying to create a game using Matlab, but I have problem using while condition. Why I need to type number 1 two times in order to do the condition?
MATLAB R2016a academic use PLOTS EDITOR PUBLISH Insert Find Files Run Section New Open Save Compare 5 i Go To Comment Breakpoints Run Run and Advance Run and Indent Find New folder (2) Editor HANew folder (2)Amain game.m* Current Folder main-game m Tries m Untitled4 x 91 main m Name 1 1: 5: 6:10:11:15 2 Level 11:s1 Main game m correct answer- main game asV main game m 4 Wrong answer 0 myscore.m myscore1.ma 6 01 input enter a numbeer myscore2.m 7 100 mytotalscore.m 8 While Q1 r; Tries,m 01 input enter a numbe if 01 10 disp ('good') break 13 end 14 end 15 16 17 main game,m (Script Search Documentation Ln Col T-IV/.F/IVExplanation / Answer
The question is liitle sloppy but one way to avid redundancy is to not inputting number before loop. Just initialise Q1 randomly and persue.
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.