pseudocode this for me and please explain since im new to this.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

pseudocode this for me and please explain since im new to this.

 

This is a python 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('\n\nfor personal dtails enter 1\nfor salary dtails enter 2\nfor gadget dtails and cost calculation enter 3\nfor 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\nenter 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\nenter 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()

Expert Solution
steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education