This is a WasmEdge LFX mentorship pre-test for Module instance dependency tree in WASM store (https://github.com/WasmEdge/WasmEdge/issues/4514)
Mentee will submit two materials on the mentorship system:
The COVER LETTER should follow the given format listed below:
No format limit, you can put anything you want
Please show the answer about the following code snippet:
def alphabetToNum(c): if c >= 'a' and c <= 'z': return (ord(c) - ord('a') + 1) * 100 elif c >= 'A' and c <= 'Z': return (ord(c) - ord('A') + 1) * 1000 elif c >= '0' and c <= '9': return int(c) else: return 10000 result = 0 for a in "111BBBccc!@#$^*": result += alphabetToNum(a) print(result)
To proof you have the basic understand about the C/C++ skills and WasmEdge C API:
;; lib.wasm
(module
(func (export "add") (param i64 i64) (result i64)
(i64.add (local.get 0) (local.get 1))
)
(func (export "mul") (param i64 i64) (result i64)
(i64.mul (local.get 0) (local.get 1))
)
)
;; calc.wasm
(module
(type $type0 (func (param i64 i64)(result i64)))
(import "lib" "add" (func $lib-add (type $type0)))
(import "lib" "mul" (func $lib-mul (type $type0)))
(func (export "add_and_square") (param i64 i64) (result i64)
;; Function to add 2 numbers and square it ((a + b)^2).
;; Exported as "add_and_square".
(call $lib-mul
(call $lib-add (local.get 0) (local.get 1))
(call $lib-add (local.get 0) (local.get 1))
)
)
)
We would like to know what's your planing to finish this mentorship inside the mentorship timeline. You should disclosure if there is a event (such as mid-term or final exam) and the progress may be less than other week.