#05 - Properties
Flowchart
Pseudocode
def get_amount_of_employees():
while True:
INPUT amount_of_employees
if amount_of_employees in range (2,6):
return amount_of_employees
else:
OUTPUT 'number of employees are too high or too low'
def get_employee_info(amount_of_employees):
employee_name=[0]*amount_of_employees
employee_id=[0]*amount_of_employees
employee_properties=[0]*amount_of_employees
for x in range(amount_of_employees):
INPUT employee_name[x]
INPUT employee_id[x]
INPUT employee_properties[x]
return employee_name,employee_id,employee_properties
def get_calculations
sales_commission[0]=employee_properties[x]*500
total_commission=sum(sales_commission)
for x in range(amount_of_employees):
OUTPUT employee_name[x],'has made',sales_commission
OUTPUT 'The company will pay',total_commission
OUTPUT 'The overall amount of properties sold was' sum(employee_properties)
get_amount_of_employees()
Code
def get_amount_of_employees():
amount_of_employees=int(input('Enter the amount of employees: '))
if amount_of_employees <2 or amount_of_employees >5:
print('Number of employees is too low or too high')
else:
return amount_of_employees
Test plan