FAQ: Survey of Computer Science - The Tale of Kenny - Control Flow and Logic

This community-built FAQ covers the “Control Flow and Logic” exercise from the lesson “Survey of Computer Science - The Tale of Kenny”.

Paths and Courses
This exercise can be found in the following Codecademy content:

Code Foundations

FAQs on the exercise Control Flow and Logic

Join the Discussion. Help a fellow learner on their journey.

Ask or answer a question about this exercise by clicking reply (reply) below!

Agree with a comment or answer? Like (like) to up-vote the contribution!

Need broader help or resources? Head here.

Looking for motivation to keep learning? Join our wider discussions.

Learn more about how to use this guide.

Found a bug? Report it!

Have a question about your account or billing? Reach out to our customer support team!

None of the above? Find out where to ask other questions here!

{Click run, then copy and paste python kenny_the_health_inspector.py into the terminal on the far right titled bash . }

Whats is bash ? and why the game wouldn’t work :confused:
regards :slight_smile:

1 Like

Hey @alashtal, I had the same problem using Chrome, but everything worked when switching to Firefox.

5 Likes

I had the same problem using safari, followed apaul272’s advice and used Firefox. Works now!

1 Like

thank you :slight_smile: @apaul272

1 Like

I’m using firefox and I still can"t get the program to run.
It keeps saying kenny_the_health_inspector is no defined.
I also can"t copy and paste into the bash terminal.
I typed help into the terminal, which led me to modules, which led me to kenny_the_health_inspector.
I was finally able to run the program that way.

I’ve had the same issue as well. It won’t run :cry: Mine just doesn’t really do anything thought I get a $ and a little blinking box.

2 Likes

I was having the same problem in Safari. To fix it, I went to Safari > Settings for This Website…

On the window that came up, I unchecked “Enable content blockers”.

When I refreshed the window, the proper Bash entry was available.

Hope that helps you, too!

3 Likes

Terminal was not displaying any information, including the ‘bash’ title. I’m using Chrome. Tried refreshing the page and the information is now displayed.

Hello i am running safari and i can’t get anything to run after i copy and paste in the far right.

@itzapepo @verocelis I was having the same problem in firefox where it wouldn’t copy and paste. initially I interpreted “python” being on a separate line and tried to execute it separately, so I was running.

python

kenny_the_health_inspector.py

which is incorrect. Below is the line that worked.

python kenny_the_health_inspector.py

there are no capitalisation of letters required and just hit enter after you have typed out the line.

10 Likes

Hi everyone,

I disabled my adblocker (ublock) and it worked in chrome. Also check your permissions for the site.

2 Likes

OMG thank you that help me!

Disabling addblocker worked in Firefox as well. Click on the shield left to the url to accomplish this.

Same issue here. Exercise was only copy and paste?

def responder():
  response = int(input("Enter the number of your choice: "))
  if response not in [1, 2]:
    print("Please enter a valid choice.")
    responder()
  return response

The helper function responder works incorrectly, it always returns first input, because you are not saving value returned from recursive call in the second line of if block.

1 Like

Hi, when I type -1 into the the field where it asks to choose a restaurant, it brings me to Lucy’s. Why does this happen?

2 Likes

Hi everyone, I’m new here. I’ve just spent a while scratching my head about why I couldn’t copy and paste python kenny_the_health_inspector.py into bash. The text wouldn’t paste into Bash using ctr-v, so I wondered if I was supposed to copy and paste the whole 200 lines of code into Bash, but again the flashing empty box in Bash just turned into a white square and no text was pasted, even though using the ‘Copy to clipboard’ icon at the bottom of the middle screen was giving me the ‘File copied!’ message. So I just tried typing “python kenny_the_health_inspector” at the Bash prompt and it works fine! I’m sure this is obvious to more experienced users, but I wonder if the instructions could be clarified, especially if there are problems with ad-blockers that can cause things to go wrong? I’ve been using Firefox all along, so don’t think my browser is the problem. Does the Paste command ctr-v not work with Bash??
Thanks,
Paul.

In most cases you can probably right click to paste, otherwise there’s normally a keybaord shortcut to paste. For me I’ve always used cmd-shift-v, but that may differ a little depending on your keyboard set-up (potentially by OS). A quick search for bash prompt and paste shortcuts will probably give you at least one answer or more so find one that works for you.

Every time I try to expand the “bash” to the whole screen so I can comfortably read and play “The Kenny the health inspector” game my internet web browser starts crashing…why is that?