Answer to Question #288210 in Python for ggfh

Question #288210

question- Write a program to store 5 names and phone numbers in two different arrays. Write another program to search for contacts from the array.


answer-

names=[""]*5

numbers=[""]*5

for i in range(5):

names[i]=input("Enter name")

numbers[i]=input("Enter number")


user_input=input("Enter value to search")

for i in range(5):

if user_input==names[i]:

print(numbers[i])


need this converted to pseudocode**



1
Expert's answer
2022-01-18T08:37:58-0500
Start
  Declare array names(5)
  Declare array numbers(5)
  Declare variable user_input
  for i=0 to 5
     Display "Enter name"
     Read names[i]
     Display "Enter number"
     Read numbers[i]
  End for  
  Display "Enter value to search"
  Read user_input
  for i=0 to 5
    if user_input=names[i] then
      Display numbers[i]
    End if
  End for
Stop

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

ggfh
18.01.22, 15:43

thankyou :')

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS