Q48.Let `timeList` be a list of pairs containing information about trains associated with a station `stn`. Each element is `[Arrival, Departure]`. If arrival or departure time is empty, it is represented as "None". What does `count` represent at the end of execution?
```
count = 0
foreach x in timeList {
if((first(x) != "None" and last(x) != "None")) {
count = count + 1
}
}
```
Save
Check
Details
Q48
20 Nov 2022
Q48.Let `timeList` be a list of pairs containing information about trains associated with a station `stn`. Each element is `[Arrival, Departure]`. If arrival or departure time is empty, it is represented as "None". What does `count` represent at the end of execution?
```
count = 0
foreach x in timeList {
if((first(x) != "None" and last(x) != "None")) {
count = count + 1
}
}
```