Question: 1)Prepare Data Dictionary and test data. Pseudocode p. 13 Planting Grapevines #Get Input Display Enter the length of the row in feet: Input R Display

1)Prepare Data Dictionary and test data.

Pseudocode p. 13 Planting Grapevines

#Get Input

Display Enter the length of the row in feet:

Input R

Display Enter the amount of space for end-post assembly in feet:

Input E

Display Enter the space between vines in feet:

Input S

# Perform processing

V = (R 2 * E) / S

# Display output

-----------------------------------------------------------------------------------------------------------------------------

2) Prepare Data Dictionary, Test data and use indentation to show statements that belong to the if clauses.

# Get input

Display ("Please enter the individual's age in years: "))

#set good data flag true if data is good, false if data is out of range

Set good data as age greater than 0 and equal to 110

if age <= 1:

Display ('This individual is an INFANT')

if age < 13:

display('This individual is a CHILD')

if age < 20:

display('This individual is a TEEN')

else:

display('This individual is an ADULT')

else:

#display an error message if data is out of range

display('ERROR - Invalid age entered')

Display The number of grapevines that will fit in one row is, V

------------------------------------------------------------------------------------------------------------------

3) Prepare Test Data and Data Dictionary

#pseudocode

#declare constants

#set speed

Min=0

Max speed= 265

Max time=24

#get input

#input validation form 1

Display(enter vehicle speed in miles per hour)

#set good data

Good data= speed is greater than minimum. Max_speed is greater than or equal to speed.

Not good data:

Display( speed out of range. Must be between,min and max_speed)

Input(enter vehicle speed in miles per hour)

Good data = speed is greater than minimum max speed is greater than equal to speed.

#input validation form 2

#set good data as false

Not good data: input( enter the time to travel in hours: )

Good date = time is greater than minimum and max time is greater than equal to time.

If data is not good:

Display(time out of range, must be between,min and max_time)

Print(hour\t distance travelled)

Print(==========================================)

#processing loop

For hours in range(1, time+1)

Display(hours, hours*speed, sep=\t\t)

-------------------------------------------------------------------------------------------------------------------------------

4) Prepare Data Dictionary and Test Data

#Pseudocode

#declare constants

#Set sentinel = -1

#set min=0

#set max=20

#get input

Display ( Enter a whole number between + string(min)\

+ and+string(max)+(\+string(sentinel)+to stop))

#Set good data = min is less than or equal to number or

The max is greater or equal to the number, or

Number is equal to sentinel.

#not good data = if number is between min, max or sentinel.

Display( Enter a whole number between + string(min)\

+ and+string(max)+(\+string(sentinel)+to stop))

#while number ! = sentinel:

If number =0, factorial =0

Else factorial = 1

For count in range (1, number+1):

Display(The factorial of,number,is,format(factorial))

Good_data=false

Not good data = display( Enter a whole number between + string(min)\

+ and+string(max)+(\+string(sentinel)+to stop))

If not good data

Display(Error! Invalid data. Number must be between,min,and,max)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!