I created this script for the user to input either English, Literature, Astronomy or History and in the command window it will accept English and History but not the other two, any help?
x=input('Please choose of of the following electives\n English\n History\n Astronomy\n Literature\n: ','s');if x=='English' disp('English has been selected.');elseif x=='History' disp('History has been selected.');elseif x=='Astronomy' disp('Astronomy has been selected.');elseif x=='Literature' disp('Literature has been selected.');else disp('Invalid choice selected.');end
Best Answer