0
0
SCADA systemsdevops~10 mins

Timestamp and data synchronization in SCADA systems - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to get the current timestamp in ISO 8601 format.

SCADA systems
current_time = datetime.[1]()
Drag options to blanks, or click blank then click option'
Atimestamp
Bnow
Ctoday
Dutcnow
Attempts:
3 left
💡 Hint
Common Mistakes
Using local time methods causes inconsistent timestamps.
2fill in blank
medium

Complete the code to convert a timestamp string to a datetime object.

SCADA systems
timestamp_obj = datetime.strptime(timestamp_str, [1])
Drag options to blanks, or click blank then click option'
A"%Y-%m-%d %H:%M:%S"
B"%d/%m/%Y %H:%M"
C"%m-%d-%Y"
D"%H:%M:%S %d-%m-%Y"
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong format strings causes parsing errors.
3fill in blank
hard

Fix the error in the synchronization check comparing two timestamps.

SCADA systems
if timestamp1 [1] timestamp2:
    sync_status = "In sync"
Drag options to blanks, or click blank then click option'
A!=
B==
C>
D<
Attempts:
3 left
💡 Hint
Common Mistakes
Using inequality operators causes false sync status.
4fill in blank
hard

Fill both blanks to create a dictionary comprehension filtering timestamps after a cutoff.

SCADA systems
filtered_data = {k: v for k, v in data.items() if v['timestamp'] [1] cutoff_time and v['status'] [2] 'active'}
Drag options to blanks, or click blank then click option'
A>
B==
C!=
D<
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong operators filters incorrect data.
5fill in blank
hard

Fill both blanks to create a dictionary with uppercase keys and values filtered by timestamp.

SCADA systems
result = {k{BLANK_2}}: v for k, v in records.items() if v['timestamp'] {{BLANK_2}} reference_time
Drag options to blanks, or click blank then click option'
A{
B.upper()
C>
D[
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong brackets or missing method calls.