[Tutor] I cant fix this bug

bob gailer bgailer at gmail.com
Wed Dec 19 02:38:17 CET 2012


On 12/18/2012 8:05 PM, Gina wrote:
> print(menu_quad())
menu_quad() calls that function which prints the quadrilateral menu. The 
function has no return statement, so by default it returns None.

The above print then prints None.

Change menu_quad() to return rather than print the menu.

BTW you really don't need a function menu_quad(). You could instead have 
a variable menu_quad which is assigned the menu, then just print menu_quad.

There are many other opportunities to improve and simplify this program. 
But it is a good start.

-- 
Bob Gailer
919-636-4239
Chapel Hill NC



More information about the Tutor mailing list