1
Task #1
Configuration languages
Parse the textual representation of the data and translate the data into the specified
output format.
The solution is:
1. Text in output format.
2. Demonstration of the correctness of the transformed data, for example, with
using online format validators.
Convert text description to YAML format:
“coal” key:
Floating point number: 1009358692.3520808
“learn” key:
Boolean value: False
Key “frequently”:
Dictionary consisting of:
Key “chest”:
String: “brother”
Key “double”:
Floating point number: -516507052.85015535
“wheat” key:
Dictionary consisting of:
“pride” key:
Boolean: True
Key “star”:
Number: 84758423
Key “her”:
String: “not”
“remain” key:
Floating point number: 676862496.1972084
Key “beautiful”:
Boolean value: False
Key “accurate”:
Number: -612657013
“blank” key:
String: “excited”
“composition” key:
Number: 2019989823
“river” key:
String: “sugar”
massage key
Floating point number: 1135967960.6271892
“perfectly” key:
Boolean value: False
“corn” key:
String: “typical”
Task #2
VM bytecode
Using the Python interpreter and the dis module, disassemble what does
given bytecode.
The solution is:
1. A step-by-step description of the action of each command, indicating the state of the stack.
2. Demonstration of the equivalent expression in Python or another familiar
high level language
1 0 LOAD_CONST 1 (1665)
2 LOAD_GLOBAL 0 (c)
4 LOAD_GLOBAL 1 (e)
6 BINARY_OR
8 BINARY_ADD
10 RETURN_VALUE
2
Task #1
Working on the command line
Used by Linux OS, scripts are created for the Bash shell.
Online Linux versions: jslinux or replit (requires an account).
The solution is:
1. Script in Bash language, given in text form and successfully
checked with ShellCheck.
2. Demonstration of an example of the script using a screenshot.
Write a program that prints the name of the smallest
the size of the file in each of the subfolders in the specified directory. Directory
passed to the program as a parameter. The output is line-by-line in the format: directory
filename.
Task #2
Configuration languages
Parse the textual representation of the data and translate the data into the specified
output format.
The solution is:
1. Text in output format.
2. Demonstration of the correctness of the transformed data, for example, with
using online format validators.
Convert text description to JSON format:
List consisting of:
Boolean value: False
Dictionary consisting of:
Key “labor”:
Boolean: True
“chicken” key:
String: “ever”
“mental” key:
Dictionary consisting of:
bush key:
81
String: “news”
“situation” key:
String: “success”
“scared” key:
String: “crowd”
Key “ruler”:
Number: -1904138977
“dozen” key:
Number: -1235012279
muscle key:
String: “happy”
“must” key:
Boolean: True
“secret” key:
String: “handle”
“adult” key:
Floating point number: -632947335.0419102
Number: -1347964918
Floating point number: -88487056.818717
Boolean value: False
Boolean value: False
3
Task #1
Working on the command line
Used by Linux OS, scripts are created for the Bash shell.
Online Linux versions: jslinux or replit (requires an account).
The solution is:
1. Script in Bash language, given in text form and successfully
checked with ShellCheck.
2. Demonstration of an example of the script using a screenshot.
Write a program that takes a file name as a parameter
and, if the file has a .py extension, it removes lines from it that are
single-line comment (begin with the # symbol).
Task #2
VM bytecode
Using the Python interpreter and the dis module, disassemble what does
given bytecode.
The solution is:
1. A step-by-step description of the action of each command, indicating the state of the stack.
2. Demonstration of the equivalent expression in Python or another familiar
high level language.
1 0 LOAD_GLOBAL 0 (f)
2 LOAD_GLOBAL 1(b)
4 LOAD_FAST 0 (h)
6 LOAD_GLOBAL 1(b)
8 BINARY_MULTIPLY
10 BINARY_XOR
12 BINARY_OR
14 LOAD_FAST 0 (h)
16 BINARY_ADD
18 LOAD_GLOBAL 2 (a)
20 BINARY_TRUE_DIVIDE
22 RETURN_VALUE
The post 1 Task #1 Configuration languages Parse the textual representation of the data appeared first on PapersSpot.