Open main menu

CDOT Wiki β

Changes

OPS435 Python Lab 3

351 bytes added, 09:19, 1 June 2017
PART 2 - Providing Functions With Arguments
:#Create a new script '''~/ops435/lab3/lab3b.py'''. Refer to the Input / Output Requirements when creating your Python script. Refer to Sample Run and Sample Imports displayed below for exact prompt and output
:::'''Input Python Script Template''' <source>#!/ Output usr/bin/env python3 def sum_numbers(number1, number2): # Make this function add number1 and number2 and return the value if __name__ == '__main__': print(operate(10, 5, 'add')) print(operate(10, 5, 'subtract')) print(operate(10, 5, 'multiply')) print(operate(10, 5, 'divide')) </source> :::'''Additional Requirements'''
:::*The script should have a '''Shebang line'''
13,420
edits