Boredless Tourist - Seeing print() output

I’m working on the Boredless Tourist project and have some issues with the Codeacademy user interface.

I have the script.py panel and the bash panel. How do I bring up the panel that shows the output of print() commands in my code? When I type in $ python3 script.py into Bash nothing happens – I suspect that there’s just another panel that I need to bring up.

Thanks in advance for your help.

Hello @netjumper21536, could you post your code, a link to the exercise and a screenshot of your learning environment, please?

Thanks for your prompt response. Here is my code for https://www.codecademy.com/paths/computer-science/tracks/cspath-cumulative-tourism/modules/cspath-boredless-tourist/projects/the-boredless-tourist and a screenshot.

#4
destinations = ["Paris, France",
"Shanghai, China",
"Los Angeles, USA",
"São Paulo, Brazil",
"Cairo, Egypt"]

#5
test_traveler = ['Erin Wilkes', 'Shanghai, China', ['historical site', 'art']]

#8
def get_destination_index (destination):
  destination_index = 0
  for i in destinations:
    if destination == i:
      destination_index = destinations[i]
    else:
      continue
  return destination_index

  #11
  print (get_destination_index ("Los Angeles, USA"))
  print ("Hello World")

Did you click save before you ran it? If not, then it will be running less script than what you have (even an empty script, if you haven’t pressed save at all.)

I have saved the code. Should I be seeing the print () output in the Bash screen?

Hello. Yes, when I do the project, the bash window is where the print() data comes up. Maybe try doing a really simple print statement, like print("hi), after commenting out all of your code, as this will identify whether there is an error with CC or your code. When I did it, I put in the bash window:

python script.py

This seemed to work:


I hope this helps!

Thanks for all of your help everyone. Looks as though the problem was actually that my print() statements at the bottom of my code were indented and I didn’t notice.

Thanks!

1 Like