Skip to content

Task 2.1: Code Snippet needs more simplification #100

Description

@FPSwitch

This code snippet I identified can use some simplification. The purpose of this code is to conduct multiplication and percentage calculations.

# Original Code
def multiply(num1, num2):   #Function to return product
    prod = num1 * num2
    return prod

def percentage(sample, total):  #percentage of a fraction
    div = sample/total
    percent = div*100
    return percent

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions