+ 2
[ASSIGNMENT] Main Menu program
First off how do I create an official challenge? Second: Make a âmain menuâ 1. Must be able to navigate back and forth through menu 2. Must have a minimum of two menu choices Suggestions: 1. Itâs very helpful for non-graphical menus to have a command specifically for displaying all available commands 2. Get creative; have different commands do different things My attempt: https://code.sololearn.com/cZdbGyN1WwWK/?ref=app
7 Answers
+ 1
Yeah the eof error is one of the things I canât figure out how to get around. Seems to come from trying to get an input while itâs being put together to run, as you said it takes all inputs at once in this app. Which is why Iâm super open to suggestions and different ways to accomplish this in python and other languages, as Iâm sure mine probably isnât the âeasiestâ most efficient way, regardless if it works or not. Just trying to learn more essentially
0
Sweet. I love old school text-based menus.
0
well the thing is the code playground compiler takes all the inputs at once which makes it so that any "menu" one would make would be hard to interact with properly
0
Good old days, loved those menu's
This is my code in C#
https://code.sololearn.com/c93HKdUStx1z
My test input was
a
b
t
q
The playground is not a good place to have a Main Menu Program.
But the code works.
0
Iâd like to add that I have an answer already written, and itâs pretty dang intuitive given the nature of this appâs compiler. I just want to give people some time to figure out a solution without mine being stuck in their head, as Iâm sure there are multiple ways to get this done, that id like to see.
0
@Erik code seems ok, but there are a few issues:
-returns an EOF error when typing in "?"
-as stated, the playground takes all inputs at once, so interactivity is lost for the most part
however it works great if i put it into another compiler so gj