practice_test1_2 - dice(ask case'g ask = input'Guess a...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
% 3/2/11 % Create a program that lets the user choose which game they want to play % again = true; while again == true game = input('Which game do you want to play: dice(d) or guess(g)?\n ', 's'); switch game case {'d'} ask = input('Guess the number the dice may roll: ');
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: dice(ask) case {'g'} ask = input('Guess a number between 0 and 100: '); guess(ask) end again = input('Would you like to play again yes(1) or no(0)?\n'); if again == false break end end e...
View Full Document

This note was uploaded on 05/01/2011 for the course HCSC 110 taught by Professor Amosjohnson during the Spring '11 term at Morehouse.

Ask a homework question - tutors are online