Write analgorithm (pseudocode) for an umberguessing game.The game starts with a randomly chosen secret target between 0 and 65,535.Usetarget to refert ot his secret value. The game
thenrepeatedlyletstheuserguessnumbersuntiltheyfindthesecrettarget.Amessageshould
begiventotheuseraftereachguess(lettingthemknowtheyfoundthesecretorgivingthema
hintfortheirnextguess;i.e.,yourlastguesswastoosmallortoobig).Youralgorithmshould
describethegamefromstarttoend.
Next,let’sconsidertheuser.Forthis,wewillassumethattheuserwillalwaysfollowanyhints
givenandcanremembereverynumberthattheyguess.So,ifauseristoldtheirlastguesswas
toobigtheywon’tguessthesamenumberorabiggernumberlaterinthegame.
Inthebeststrategyfortheuser,whatisthemaximumnumberofguessesthattheyneedtofind
thetarget?Intheworststrategy,whatisthemaximumnumberofguessesthattheymightneed
tofindthetarget?Explainyouranswers.Notethatyoucanpickthetargettobewhateveryou
wantinordertomaximizethenumberofguesses(andyoucanchangeitduringthegameas
longasyoudon’tviolateanypreviousguessorhintgiven).Yougivethesequenceofguesses
thattheusergives.
Saveyouranswerinaplaintextfilecalledguess.txt.Addyourguess.txtfiletoyour
submissionA1.zipfile..
Besurethatitisaplaintextfileandnotinanyotherformat(suchas.doc,.docx,.rtf,.pdf,etc.).