Examlex

Solved

Given the Following Pseudocode:
Start
FINAL-ACCUM =0= 0 NAME-ACCUM =0= 0 Read NAME, AMT
SAVE-NAME

question 4

Multiple Choice

Given the following pseudocode:
Start
FINAL-ACCUM =0= 0
NAME-ACCUM =0= 0
Read NAME, AMT
SAVE-NAME == NAME
DOWHILE not EOF
IF NAME \neq SAVE-NAME THEN
Write NAME-ACCUM
FINAL-ACCUM = FINAL-ACCUM + NAME-ACCUM
NAME-ACCUM =0= 0
SAVE-NAME == NAME
ELSE
Write NAME, AMT
NAME-ACCUM =NAMEACCUM+AMT= \mathrm { NAME } - \mathrm { ACCUM } + \mathrm { AMT }
ENDIF
Read NAME, AMT
ENDDO
Write FINAL-ACCUM
Stop
How many lines will be output if the following records are input?
John     20.00
John     30.00
Mary     10.00
Mary     6.00
Sue       8.00
Sue      5.00


Definitions:

MDMA

A compound related to both amphetamines and hallucinogens, especially mescaline; it produces a high that typically lasts a few hours or more.

LSD

Lysergic Acid Diethylamide, a powerful psychoactive drug known for its psychological effects, which can include altered thoughts and sensory perceptions.

THC

Tetrahydrocannabinol, the principal psychoactive constituent of cannabis, responsible for its mind-altering effects.

Cognitive Effects

Impacts on mental processes such as thinking, memory, and problem-solving.

Related Questions