Talk is cheap. Show me the code
时间: 2024-04-24 12:25:28 浏览: 171
13-套接字Socket:Talk is cheap, show me the code1
Sure! Here's a simple example code in Python that calculates the sum of two numbers:
```python
def sum_numbers(a, b):
return a + b
num1 = 5
num2 = 10
result = sum_numbers(num1, num2)
print("The sum of", num1, "and", num2, "is:", result)
```
When you run this code, it will print: "The sum of 5 and 10 is: 15". This demonstrates a basic function that takes two numbers as input, calculates their sum, and displays the result.
阅读全文