concept print function in category raspberry pi

appears as: print function, The print function
Hello Raspberry Pi!: Python programming for kids and other beginners

This is an excerpt from Manning's book Hello Raspberry Pi!: Python programming for kids and other beginners.

Figure 2.8. When a variable is created, it’s stored in your Raspberry Pi’s memory. You can change the value of a variable at any time. Using the print function, you can display the variable’s value on the screen.

Using the print function

Earlier in this chapter, you used the print function to display the value of variables. Let’s go over more about using the print function. Try printing the message “Hello World!” to the screen like this:

>>> print("Hello World!")
Hello World!

Take a closer look at how you can use the print function in figure 2.10. Python prints “Hello World!” to the Python Shell.

Figure 2.10. The print function in Python displays text on the screen. The string inside the parentheses must be enclosed in single or double quotation marks.
sitemap

Unable to load book!

The book could not be loaded.

(try again in a couple of minutes)

manning.com homepage
test yourself with a liveTest