Open main menu

CDOT Wiki β

Changes

OPS435 Python Lab 3

718 bytes removed, 11:04, 31 May 2017
PART 2 - Providing Functions With Arguments
:'''Perform the Following Instructions:'''
:#Create a new script '''~/ops435/lab3/lab3b.py'''
The next script is NOT COMPLETE, your job is to make the script do what it askes. It contains 3 functions, one of adding, one for subtracting, and one for multiplying. Make sure each function performs the correct operation and returns a integer value. with the following contents:<source>#!/usr/bin/env python3 def sum_numbers(number1, number2): #  def subtract_numbers():  def multiply_numbers(): # Make this function multiply number1 and number2 and return the value # Remember to make sure the function accepts 2 arguments # Place any code you want to test inside the if statement for practiceif __name__ == '__main__': print(sum_numbers(10, 5)) print(subtract_numbers(10, 5)) print(multiply_numbers(10, 5))</source> :#Create a new script '''~/ops435/lab3Input /lab3b.pyOutput Requirements'''
:::*The script should have a '''Shebang line'''
13,420
edits