Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
python lesson 1 function
# Covered so far: # 1. Simple data types # 2. If conditions # 3. While/for loops # 4. Functions # def function_name(arg1, arg2, ..., argN): # do_something def add(input_list): total_sum = 0 for each_num in input_list: total_sum = total_sum + each_num return total_sum # total_sum each_num total_sum + each_num # 0 3 = 3 -> total_sum # 3 2 = 5 -> total_sum # 5 45 = 50 -> total_sum # Write a function that adds two numbers x_list = [7, 4, 1.2] print (add(x_list))
run
|
edit
|
history
|
help
0
Transpose matrix
Atur cara mengira luas permukaan dan isipadu sebuah trapezium
Подарки
My first code
My webapp demo
Prime Numbers : -> Conventional Method
POO I EN PYTHON 3
main_game
Fig
Python: Stack Simple I