0% found this document useful (0 votes)
14 views23 pages

Higher Software Development

The document is a review for an end-of-topic test in higher software development, covering various programming concepts such as string manipulation, client requirements, function parameters, and array handling. It includes specific questions and answers related to programming logic, loops, and data structures. Additionally, it discusses validation criteria and the use of data classes in Python.

Uploaded by

mashac
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views23 pages

Higher Software Development

The document is a review for an end-of-topic test in higher software development, covering various programming concepts such as string manipulation, client requirements, function parameters, and array handling. It includes specific questions and answers related to programming logic, loops, and data structures. Additionally, it discusses validation criteria and the use of data classes in Python.

Uploaded by

mashac
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 23

Higher Software

Development
End of Topic Test Review
Question 1

username = surname[0:3]+forename[:1] ● 1 mark both substrings


● 1 mark for concatenation
Or

username = surname[:3]+forename[0]
Question 2

The client:

● Details requirements
● Outlines scope and boundaries
● Evaluates prototype/suggest changes
● Provides feedback/liaising with development team throughout process
Question 3
Question 3a(i)

● Now,then
● This is the values/parameters that are passed into the function/subprogram
Question 3a(ii)

● Previous/Current
Question 3b

● The values are switched/passed into the incorrect parameters


Question 3c

● Local/Lines 1-5
● Only exists in this subroutine/can’t be accessed out with the subroutine in which it
is declared
Question 4
Question 4a

2
Question 4b

● Use a conditional loop ● 1 mark for each bullet


● With termination
Termination examples include target is
found, target!=list[index], found =false
Question 4c(i)

0
Question 4c(ii)

● Logic
● Returns a position for an item that is not in the list OR Returns the position of the
first item in the list/0123
Question 5
Question 5a

● Three arrays Dates = [""] * 30


● With 30 elements
visitors = [0] * 30

groupsize = [0.0] * 30
Question 5b

1 mark for each bullet


total = 0
FOR length of dates
If current visitors >=2000 OR current groupsize >5 THEN
total = total +1
END IF
END LOOP
DISPLAY “There were” & total & “days matching those search conditions”
Question 5b (cont)
1 mark for each bullet
total = 0
FOR length of visitors
If current visitors >=2000 OR current groupsize >5 THEN
total = total +1
END IF
END LOOP
DISPLAY “There were” & total & “days matching those search conditions”

● 1 mark for initialising and increment total


● 1 mark for loop with termination
● 1 mark for condition matching visitors and condition matching groupsize
● 1 mark for concatenation
Question 5b (cont)
total = 0
FOR length of visitors
If visitors[x] >=2000 OR size[x] >5 THEN
total = total +1
END IF
END LOOP
DISPLAY “There were” & total & “days matching those search conditions”

● 1 mark for initialising and increment total


● 1 mark for loop with termination
● 1 mark for condition matching visitors and condition matching groupsize
● 1 mark for concatenation
Question 6
Question 6a

● Speed/Pulse >=0
● Battery – min 0% max 100%
● No validation required.
Question 6b

@dataclass ● Record structure with name


class reading: ● Six fields specified
Pulse: int = 0
Activity: str = ""
Battery: int = 0
Speed: float = 0.0
Distance: int = 0
Stationary: bool = False
Question 6c

Set position to -1
Set highest to 0
Loop for each reading
If current activity = “Walking” and current speed > highest
Set highest to current speed
Set position to index
End if
End loop
Question 6c (cont)

Set position to -1
Set highest to 0
Loop for each reading
If readings[x].Activity = “Walking” and readings[x].speed > highest
Set highest to readings[x].speed
Set position to x
End if
End loop

You might also like