# Kaggle 部分程式 > [name=ChiuTing] ```cpp= from learntools.core import binder; binder.bind(globals()) from learntools.python.ex1 import * print("Setup complete! You're ready to start question 0.") ``` 每個單元的exercise都要把這段程式按執行 --- ![](https://i.imgur.com/mX6DL4p.png) ```cpp= #1 pi = 3.14159 # approximate diameter = 3 radius = diameter/2 area = radius**2*pi # Create a variable called 'radius' equal to half the diameter ____ # Create a variable called 'area', using the formula for the area of a circle: pi times the radius squared ____ # Check your answer q1.check() ``` ```cpp= #2 ########### Setup code - don't touch this part ###################### # If you're curious, these are examples of lists. We'll talk about # them in depth a few lessons from now. For now, just know that they're # yet another type of Python object, like int or float. a = [1, 2, 3] b = [3, 2, 1] a=b q2.store_original_ids() ###################################################################### # Your code goes here. Swap the values to which a and b refer. # If you get stuck, you can always uncomment one or both of the lines in # the next cell for a hint, or to peek at the solution. ###################################################################### # Check your answer q2.check() ``` ```cpp= #3 (5 - 3) // 2 ``` ![](https://i.imgur.com/OQHt9wD.png) ![](https://i.imgur.com/PxE0eiY.png) ![](https://i.imgur.com/HwYsSsr.png) ![](https://i.imgur.com/eDwBRRi.png) ![](https://i.imgur.com/24O35eb.png) ![](https://i.imgur.com/Kvcvwcm.png) ![](https://i.imgur.com/H6NXO7l.png) ![](https://i.imgur.com/iU83cRr.png) ![](https://i.imgur.com/Y6tDMRA.png) ![](https://i.imgur.com/zhJ7q2p.png) ![](https://i.imgur.com/ivBsUk4.png) ![](https://i.imgur.com/tsQKE3V.png) --- # LISTS ![](https://i.imgur.com/xYZ7xjh.png) ![](https://i.imgur.com/0u8WoYp.png) ![](https://i.imgur.com/iVV2OnE.png) ![](https://i.imgur.com/OFHbESw.png) ![](https://i.imgur.com/V4CaTn5.png)