fork(1) download
  1. print("Hello World")
  2.  
  3. #複数出力
  4. print(10,20)
  5.  
  6. #改行なし
  7. print(10) #改行あり
  8. print(10,end="") #改行なし
  9. print(10)
  10.  
  11. #数値演算子
  12. print(1 + 1)
  13. print(5 - 2)
  14. print(3 * 2)
  15. print(4 / 2) #割り算の商(小数)
  16. print(10 // 3) #割り算の商(整数)
  17. print(10 % 3) #割り算の余り
  18. print(10 ** 3) #累乗
  19.  
  20. #round()の使用例1
  21. print(round(4/2))
  22.  
  23. #round()の使用例2
  24. print(round(10/4)) #0.5を切り捨て
  25. print(round(7/2)) #0.5を切り上げ
Success #stdin #stdout 0.13s 14136KB
stdin
Standard input is empty
stdout
Hello World
10 20
10
1010
2
3
6
2.0
3
1
1000
2
2
4