Print


#1

Strings and Console OutputPage 10 says print simply displays your code in the console. print displays the results or the print statement not my code. Please clarify.


#2

what do you mean? If we do:

print "hello world"

print will cause hello world to the console (the window on the right hand side in the lesson)

if you include the url of the actual lesson you are on, that would make things a lot easier :slight_smile:

from the lesson:

The area where we’ve been writing our code is called the editor.

The console (the window to the right of the editor) is where the results of your code is shown.

print simply displays your code in the console.

so someone wrote print, which we can use to display strings to the console


#3

Stetim
Here is the page link:
https://www.codecademy.com/courses/learn-python/lessons/strings--console-output/exercises/printing-strings?action=lesson_resume&link_content_target=interstitial_undefined

It includes the words “print simply displays your code in the console” but
print doesn’t display my code in the console, it displays the value of the
variable that I enter after the word “print”.

Thanks & Regards
Neil


#4

what code did you add, option a:

"print simply displays your code in the console"

or option b:

print "simply displays your code in the console"

print is a statement in the python language, it shouldn’t be part of the string if you want the statement to work


#5

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.