@extends('template') @section('title') Lab 3, Part 1: print, return, and None @stop @section('content') # Lab 3, Part 1: print, return, and None Summary - `print` causes characters to be displayed in the shell (the bottom pane of your Thonny window) - `return` specifies the result of the function invocation - a function without an explicit `return` statement returns the special `None` value (which Python typically does not print) [Here is the worksheet as a google doc](https://docs.google.com/document/d/1Si5WZQ278a9Zz9Jj6ecvK7rzaLf2c5wIIChIcCTUp1U/edit?usp=sharing) Open the document, then File -> Make a Copy. Then you can edit your copy with your answers. Examine the following functions. Which are **fruitful** and which are **None** functions? ```py def hello(x): print('--', x, '--') def square(x): return x * x def showSquare(num): print('The argument of square is ' + str(num)) return square(num) ``` Predict the outcome of the invocations below: ```py >>> hello('froggy') >>> print(hello('bunny')) ``` ```py >>> square(3) + square(4) ``` ```py >>> square(square(3)) ``` ```py >>> showSquare(5) ``` ```py >>> showSquare(3) + showSquare(4) ``` ```py >>> hello('frog') + hello('toad') ``` @include('/labs/lab03/_toc') @stop