Changes

Jump to: navigation, search

OPS435 Python3 Lab 3

36 bytes added, 16:49, 19 September 2019
PART 2 - Function that does not take argument but returns a value
</source><br><br>
== PART 2 - Function that does not take argument but returns a value string ==
:#Let's create a function that '''returns''' some data to the caller after the function is called. This function does not print out any text: instead; it creates new objects and at the end returns one of the object named '''greeting''', which is a string object containing 'Good Monring Terry'.<source lang="python">
def return_text_value():
</source>
'''Functions and Numbers (Integers)'''== PART 3 - Function that does not take argument but returns an number ==
: You will now learn how to define and call functions that will return '''integer data'''. In this section, you will define a function that will be returning an integer values instead of string. There is not a big difference, but when returning number values, care needs to be taken if you try combining it with a string!
1,760
edits

Navigation menu