{"id":518,"date":"2020-10-14T17:31:21","date_gmt":"2020-10-14T17:31:21","guid":{"rendered":"https:\/\/marshallbrain.com\/wordpress\/?page_id=518"},"modified":"2020-10-14T17:31:21","modified_gmt":"2020-10-14T17:31:21","slug":"python4","status":"publish","type":"page","link":"https:\/\/marshallbrain.com\/python4","title":{"rendered":"Marshall Brain\u2019s Quick and Easy Python Tutorials \u2013 Chapter 4"},"content":{"rendered":"\n

by Marshall Brain<\/a><\/p>\n\n\n\n

In the previous tutorial we have our little coin flipping program. It is only 11 lines long, yet it is getting a little complicated. If someone handed you this program and you had never seen it before, you would have to look at it awhile to figure out what it is doing.<\/p>\n\n\n\n

One thing that can help control the complexity would be to take little pieces of code and give them names. This next program shows a way to do that:<\/p>\n\n\n\n