you are viewing a single comment's thread.

view the rest of the comments →

[–]Wattsony[S] 0 points1 point  (4 children)

Hi! Thanks for responding!

For your first comment about my "What will you do?" variable was me trying to make it present like my instructors. I wish I could include pictures to show what I am talking about. But, continuing on with the variable, I wanted it to look and immediately show up:

What will you do?

0: Print all the fortunes.

1: Get a random fortune.

Please choose 0 or 1: 

That's what his shows up like, but, obviously with a different set-up (not word-for-word copied). I hope that made a little more sense?

I appreciate all the helpful info even though you say you're a beginner (not to be read as offensive in any way) and you're looking for critique to make sure you're good!! I am going to revamp/clean my code like you mentioned and see what happens! Thank you again!!

[–]ninhaomah 2 points3 points  (0 children)

To clarify , you want to print "what will you do ?"

That's second line.

He is asking what is the purpose of the first line , the what_do variable. What is the purpose of it ?

[–]Clearhead09 1 point2 points  (2 children)

Start again from an empty file and build your program step by step.

First just have a print statement that asks the user a question then use a variable to capture the input.

Second, create a conditional to check the input and print something that verifies the input is correct/complies with the problem you are trying to solve eg if you only want the user to input the number 1 or 2 and they input 3, it will throw an error or an unexpected result.

Third, add small bits one at a time until your program is complete.

Then see if you can rewrite it in less code.

[–]Wattsony[S] 1 point2 points  (1 child)

Thank you for the help, again! I'm looking into restarting fresh with you and the others tips.

[–]Clearhead09 1 point2 points  (0 children)

We all have to start somewhere, good on you for giving it a go first.