move testing page down
This commit is contained in:
@@ -1,32 +1,12 @@
|
||||
# sample function without input arguments and return values
|
||||
|
||||
def print_hello():
|
||||
# Example 3: Demonstrating basic arithmetic operations
|
||||
|
||||
a = 10 # Assigns integer 10 to variable 'a'
|
||||
|
||||
b = 3 # Assigns integer 3 to variable 'b'
|
||||
print('Hello WT!')
|
||||
|
||||
|
||||
|
||||
# type function name to call the function directly.
|
||||
|
||||
print_hello()
|
||||
|
||||
print_hello()
|
||||
|
||||
print_hello()
|
||||
|
||||
# sample function with input arguments and return value
|
||||
|
||||
def tree_sum(a,b,c):
|
||||
|
||||
result = a+b+c
|
||||
|
||||
return result
|
||||
|
||||
|
||||
|
||||
# call function with given values and use another variable to hold return values
|
||||
|
||||
sum1 = tree_sum(1,2,3)
|
||||
|
||||
sum2 = tree_sum(4,5,6)
|
||||
|
||||
|
||||
c = 2.5 # Assigns floating-point number 2.5 to variable 'c'
|
||||
|
||||
|
||||
|
||||
print('Addition: ', a + b) # Prints the sum of 'a' and 'b'
|
||||
|
||||
Reference in New Issue
Block a user