I wrote the code to round up the decimals, but the execution result is as follows.
b = 2.5 b = 2.5
What i want to ask
b = 2.5 b = 3
Please tell me what to do.
import math a = 5 b = a/2.0 print ("b =", b) math.ceil (b) print ("b =", b)
Answer # 1
b = math.ceil (b)
I have thrown away the calculation result
Answer # 2
print ("b =", math.ceil (b))What is that?
Answer # 3
import math a = 5 b = a/2.0 print ("b =", b) print ("math.ceil (b) =", math.ceil (b))) bx = math.ceil (b) print ("bx =", bx)
- python - you may need to restart the kernel to use updated packages error
- php - coincheck api authentication doesn't work
- php - i would like to introduce the coincheck api so that i can make payments with bitcoin on my ec site
- [php] i want to get account information using coincheck api
- the emulator process for avd pixel_2_api_29 was killed occurred when the android studio emulator was started, so i would like to
- python 3x - typeerror: 'method' object is not subscriptable
- i want to call a child component method from a parent in vuejs
- dart - flutter: the instance member'stars' can't be accessed in an initializer error
- xcode - pod install [!] no `podfile 'found in the project directory