Answer to Question #145970 in Python for Rio

Question #145970
Write the pseudocode for an application that will:
a. Prompt a user for three numbers.
b. Store the values entered by a user in an array as they are provided by
the user.
c. Ask a user if they would like to search for a value:
i. If the user wishes to search for a value, the user needs to be
prompted for a value to search for. If the value is found, a
notification needs to be provided to the user.
d. Use a for loop to cycle through the arrays in order to calculate and
display the total of the values stored in the array
1
Expert's answer
2020-11-22T23:42:41-0500
#python 3.7.1


# creating array to store values
arr=[]
for i in range(3):
  a = int(input(" "))
  arr.append(a)
print(arr)


# searching number in the array 
n = int(input(" "))
if n in arr:
  print(" Write notification that needs to be displayed ")
else:
  print("Number is not in the array ")
  






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

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS