Answer to Question #290660 in Python for gudani

Question #290660

Write the pseudocode for an application that will prompt a user for a numeric value and then search for the value provided in the mark array


1
Expert's answer
2022-01-26T12:55:05-0500
Pseudocode 
		Start
			Declare array numbers 
			For i=0 to 3 step 1
				Prompt a user for a number
				Get a number from a keyboard
				Add a number to the array numbers
			end
			Display message: "Would like to search for a value?y/n"
			Get the answer from a keyboard
			if answer = y then
				Display a message: "Enter a value to search for"
				Get a value from a keyboard
				isFound=false
				For i=0 to 3 step 1
					if value=numbers(i) then
							Display a message:"The number is found"
							isFound=true
							Exit loop
					end if
				end
				if isFound =false then 
						Display a message: "The number is not found."
				end if
			end
			Declare variable totalValues=0
			For i=0 to 3 step 1
				totalValues=totalValues+numbers(i)
			end
			Display a message: "The total of the values stored in the array is: "+totalValues
		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

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS