Question: Create a script that has a fireman respond yes or no to being asked whether he sees a book. If he answers yes, then set
Create a script that has a fireman respond yes or no to being asked whether he sees a book. If he answers yes, then set the book burning temperature to 451. If he responds no, then ask if he wants to continue looking. If he says yes, have the process start over. If he says no, set the book burning temperature to 0, and print out to the user No books to burn today.
(in MATLAB )
this is what I have and when i input 'yes' nothing happens and when i input 'no' it says "matrix must agree error line 2"
answer = input('do you see a book?'); if answer == 'yes' bookBurningTemp = 451; else answer == 'no' choice = fprintf('do you want to keep looking?'); if choice == 'yes' fprintf('i dont know how to start the process over'); else choice == 'no' bookBurningTemp = 0; fprintf('no books to burn today. '); end end
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
