Automate 00

$10.00

Category:

Description

Automate 00

Assessment 1 – Computer Based Activities

Task 1 : Investigate flowchart symbols

What are the four basic flowchart symbols and what do they represent?

Terminal  or Terminator Shape : This shape tells where the flowchart begins and ends. 

Lines with Arrows : Use for read a flowchart by following the lines with arrows from shape to shape.

Rectangle : In most flowcharts, the rectangle is the most common shape. It is used to show a process, task, action, or operation.

Decision : A decision asks a question. The answer to the question determines which arrow you follow out of the decision shape.

Task 2 : Identify algorithm pre-conditions

• The goal for algorithm is calculate the greatest common divisor

•Condition would it fail when B=0

Task 3 : Write an algorithm demonstrating sequence.

Task 4 : Write an algorithm demonstrating selection

YesNo

Yes No

Yes No

Task 5 : Write an algorithm demonstrating iteration

READ Maxnum

SET Total=0

SET Count=1

WHILE Count<Maxnum

SET Total=Total+Count

SET Count=Count+1

ENDWHILE

DISPLAY Total

Task 6 : Create an abstract design

......

Automate 00
Last updated: Feb 2024

Page 1

6 : Create an abstract design

Write an algorithm to process the pay information for employees according to the following

SET moreToDo = 1

WHILE moreToDo == 1

READ hoursWorked

READ payRate

SET grossPay = HoursWorked * payRate

SET tax = grossPay * 0.3

SET netPay = grossPay – tax

DISPLAY grossPay

DISPLAY tax

DISPLAY netPay

DISPLAY ‘Process another pay?’

READ anotherPay

IF anotherPay == ‘Y’

SET moreToDo = 1

ELSEIF anotherPay == ‘y’

SET moreToDo = 1

ELSE

SET moreToDo = 0

ENDIF

ENDWHILE

Task 7 : Review abstract design

Perform a desk-check on the algorithm using your test inputs. Does the algorithm meet the program specifications? If not. What errors did you identify?

SET moreToDo = 1

WHILE moreToDo == 1

READ hoursWorked

READ payRate

SET grossPay = HoursWorked * payRate

SET tax = grossPay * 0.3

SET netPay = grossPay – tax

DISPLAY grossPay

DISPLAY tax

DISPLAY grossPay

DISPLAY ‘Process another pay?’

READ anotherPay

IF anotherPay == ‘y’

SET moreToDo = 1

ELSEIF anotherPay == ‘y’

SET moreToDo = 1

ELSE

SET moreToDo = 0

ENDIF

ENDWHILE

Task 8 Translate an algorithm to script code

Number1=int(raw_input(raw_input))

Number2=int(raw_input(raw_input))

total=0

while number1<=number2:

total=total+number1

number1=number1+1

Print’ The total is’,total

Task 9 Identify and correct a logic error

#prompt user for the temperature to convert to.

#prompt user for the temperature to convert to be converted.

#conversation are:

#Celsius to Fahrenheit

#subtract 32 from temperature then multiply by 5 then

#divide by 9

#Fahrenheit to Celsius

#Divide temperature by 9 then…

...

Automate 00
Last updated: Feb 2024

Page 2

You've reached the end of your free preview.

Want to read all pages?