-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathExample.nc
More file actions
51 lines (39 loc) · 1.17 KB
/
Copy pathExample.nc
File metadata and controls
51 lines (39 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
=== Semantics ===
Function add(a, b):
Inputs - two numbers
Outputs - their sum
Function multiply(a, b)
Inputs - two numbers
Outputs - their product
=== Code (Python ) ===
def add(a, b):
"""
Adds two numbers.
Parameters:
a (float or int): The first number.
b (float or int): The second number.
Returns:
float or int: The sum of the two numbers.
Time Complexity: O(1) - the operation takes constant time.
Space Complexity: O(1) - no additional space is used, just the output.
"""
return a + b
def multiply(a, b):
"""
Multiplies two numbers.
Parameters:
a (float or int): The first number.
b (float or int): The second number.
Returns:
float or int: The product of the two numbers.
Time Complexity: O(1) - the operation takes constant time.
Space Complexity: O(1) - no additional space is used, just the output.
"""
return a * b
=== Metadata ===
version: 0.1
language: python
saved_at: 2025-11-21T20:30:47.613709+00:00
semantics_hash: 3c0e905b7b20af800968bb7cef601842aac2b4837bbf1e84b9cf8aaf242ccde5
code_hash: 14db1015a4c4641d8abbd7a2b041a8ca2d0aaf5a1419138a8b0d2ad6f81140df
model: gpt-4o-mini