Warning: The magic method Slickr_Flickr_Plugin::__wakeup() must have public visibility in /home/kenbauer/public_kenscourses/tc101winter2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php on line 152

Warning: Cannot modify header information - headers already sent by (output started at /home/kenbauer/public_kenscourses/tc101winter2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101winter2015/wp-includes/feed-rss2.php on line 8
‘#you’ Articles at Courses by Ken https://kenscourses.com/tc101winter2015 Facilitator of Learning Experiences Thu, 19 Feb 2015 04:59:14 +0000 en hourly 1 https://creativecommons.org/licenses/by/4.0/ #mastery10 Basic output (print) in Python https://kenscourses.com/tc101winter2015/2015/mastery10-basic-output-print-in-python-2/ Thu, 19 Feb 2015 04:59:14 +0000 http://gilrg18.withknown.com/2015/mastery10-basic-output-print-in-python Continue reading →]]>

To show a message on python you have to use the print function which is probably the easiest, here’s an example:

print (“Hello World”) have to put “Hello World” between quotation marks because it is a string 

This will show the user:

Hello World

You can also print variables with this function, for example:

num= 1

print (num) quotation marks because num is a variable that contains a number

This will show the user:

1

BUT if you put num= helloworld this will show an error that says that helloworld is not defined because the program will take helloworld as another variable. If you want to add a string to a variable it must be between quotation marks like this:

num= “helloworld”

print (num)

This will show the user:

helloworld

🙂

 

]]>
https://creativecommons.org/licenses/by/4.0/