SOLVED:HOMEWORK 02: FRUITFUL FUNCTIONS & CONDITIONALS

$24.99 $18.99

Introduction The goal of this homework is for you to learn the difference between print and return as well as give you practice with conditionals. Part 1 consists of 4 simple functions and 1 function which uses those 4 functions. Part 2 consists of 2 functions that will test your knowledge of conditionals. You have…

5/5 – (2 votes)

You’ll get a: zip file solution

 

Categorys:

Description

5/5 – (2 votes)

Introduction

The goal of this homework is for you to learn the difference between print and return as well as give you practice with conditionals. Part 1 consists of 4 simple functions and 1 function which uses those 4 functions. Part 2 consists of 2 functions that will test your knowledge of conditionals. You have been given HW2.py to fill out with instructions in the docstrings. However, below you will find more detailed information to complete your assignment. Read it thoroughly before you begin. You have until Thursday, September 7th to complete this assignment.

Print vs Return

Two concepts that may be difficult for beginner programmers to differentiate between are the print function and the return statement. While it may appear that they do the same thing, it is important to note that they do not do the same thing. The print function as its name states, is a function just like round or any other pre-defined and user defined functions. The only purpose for the print function is to display information to the user. You cannot save what you print. The return statement, on the other hand, is part of a function definition. All functions have a return statement, whether you explicitly write one or not; functions that do not explicitly have a return statement always return the value None. The return statement is useful because it allows you to assign a value to a function, thus allowing you to either save it for later, use it in a more complex expression, or print it for human consumption.

Important note to remember: print is for the user whereas return is for the program.

Authors: Erica Chia and Christine Feng | Report Issues: echia3@gatech.edu or christinefeng@gatech.edu

SOLVED:HOMEWORK 02: FRUITFUL FUNCTIONS & CONDITIONALS
$24.99 $18.99