complete PythonX Lesson1

This commit is contained in:
BuffTechTalk
2024-09-09 20:45:26 -05:00
parent 7d72f016af
commit 9b8826af7f
19 changed files with 553 additions and 15 deletions

View File

@@ -1,6 +1,32 @@
print("hello")
i = 100
while(i>10):
print(f"Value of {i}")
i = i-1
# sample function without input arguments and return values
def print_hello():
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)