Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

write a user manual for this code detail_emp={} inventary={'R':0,'S':0,'L':0,'M':0} name_gadget={'R':'Router',S:'Switches',L:Laptop,M:Mainframe} def main( ): n=input(' for personal dtails enter 1 for salary dtails enter 2

 write  a user manual for this code

 




detail_emp={}

inventary={'R':0,'S':0,'L':0,'M':0}

name_gadget={'R':'Router',"S":'Switches',"L":"Laptop","M":"Mainframe"}

def main( ):

n=input(' for personal dtails enter 1 for salary dtails enter 2 for gadget dtails and cost calculation enter 3 for exit enter 0')

while n !='0':

if n=='1':

personal()

break

elif n=='2':

salary()

break # here we implement main function

elif n=='3':

gadget()

break

elif n=='0':

exit()

else:

n=input('please enter valid entry')

def personal():

n=input('enter 1 for adding emplyee details enter 2 for display details')

if n=='1':

name=input('enter name') # store details of employee

detail_emp[name]=[name,' ',input('enter phone number'),' ',input('enter designation')]

elif n=='2':

for i in list(detail_emp.keys()): # it is used to display each employee detail

det=detail_emp[i]

print(*det)

else:

print('not valid entry')

main()

def salary():

nam=input('enter employee name')

h_w=float(input('enter wages per hour of '+nam))

h=float(input('enter no of hour '+nam+' worked in month'))

print('salary of ',nam,' is ',h_w*h)

main()

def gadget():

print('inventary: ',inventary['R'],' Routers,',inventary["S"],' Switches,',inventary["L"],' laptops,',inventary["M"],' Mainframe')

n=input('enter 1 for gadget modification enter 2 for cost')

if n=='1':

n1=input('What do you want to add? Press "R" for router, "S" for switch, "L" for Laptop, "M" for Mainframe')

inventary[n1]+=int(input('How many of '+name_gadget[n1]+ ' do you want to add?'))

elif n=='2':

k=0 # calculate cost of gadets

for i in ['Routers','Switches','laptops','Mainframe']:

price=float(input('enter price of '+i))

no_item=float(input('enter no of item of '+i))

k+=(price*no_item)

print(k)

main()

main()

Step by Step Solution

There are 3 Steps involved in it

Step: 1

User Manual for the Provided Code 1 Introduction This code is designed to manage employee details calculate salaries and handle gadget inventory and c... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Systems analysis and design

Authors: kenneth e. kendall, julie e. kendall

8th Edition

135094909, 013608916X, 9780135094907, 978-0136089162

More Books

Students also viewed these Programming questions

Question

What are the three sections useful for simplifying a display?

Answered: 1 week ago

Question

How can an event table be used to create a data flow diagram?

Answered: 1 week ago