Assessment 1 – computer based activities

$10.00

Category:

Description

Assessment 1 – computer based activities

Assessment 1 – Computer Based Activities

Task 1

Arrow

These are known as the flow lines and are used to indicate the direction of the flow of the diagram. These are used to connect the symbols.

Rectangle

These are action symbols and or process symbols. They provide the flowchart with actions.

Diamond

The diamond indicates that this is a decision symbol and therefore, has a set condition or conditions which allow the flowchart to choose either yes or no.

Oval

Oval symbol indicates the beginning and end of the flowchart.

Task 2

The main purpose of this algorithm is to identify the highest or greatest common divisor of two integers.

The only condition that this algorithm would fail would be if B = 0

Task 3

Task 4

Task 5

READ Number

SET count = 1

WHILE count

Set Total = Total + Count

Set Count = Count + 1

ENDWHILE

DISPLAY ‘Total’

Task 6

SET pay = 1

WHILE pay = 1

READ Hours Worked

READ Pay Rate

SET Gross Pay = Hours Worked * Pay Rate

SET Tax = Gross Pay * 0.3

SET Net Pay = Gross Pay – Tax

DISPLAY Gross Pay

DISPLAY Tax

DISPLAY Net Pay

DISPLAY “Would you like to process another pay?”

ELSEIF “Yes”

Set Pay = 1

ELSE

Set Pay = 0

ENDWHILE

Task 7

SET moreToDo = 1

WHILE MoreToDo = 1

READ hoursWorked

READ payRate

......

Assessment 1 – computer based activities
Last updated: Sep 2023

Page 1

READ payRate

SET grossPay = hoursWorked * payRate

SET tax = grossPay * 0.3

SET netPay = grossPay tax

DISPLAY grossPay

DISPLAY tax

DISPLAY netPay

DISPLAY “Would you like to process another pay?”

READ anotherPay

IF anotherPay == “y”

SET moreToDo = 1

ELSEIF anotherPay = 1

SET moreToDo = 1

ELSE

SET moreToDo = 0

ENDIF

ENDWHILE

Task 8

Number1 = int (raw_input [raw_input])

Number2 = int (raw_input [raw_input])

Total = 0

While number1≤ number2:

Total = total + number1

number1 = number1+1

Print “Total

Task 9

# 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 multiply by 5 then and 32

# Display the original and converted temperature

Conversation =’it was conversation to’

Celsius = ‘celsius

FahrenheitString =’fahrenheit

gotconvertTo = 0

Assessment 1 – computer based activities
Last updated: Sep 2023

Page 2

You've reached the end of your free preview.

Want to read all pages?