/BananasPerField

Calculating Bananas Per Football Field in every language.

Primary LanguageJava

BananasPerField

Calculating the number of bananas that can fit in a football field in various programming languages.

Goal

The goal of this project is to determine how many bananas can fit in a football field using different programming languages.

Variables and Values

To calculate, ensure your variables and values align as follows:

  • Width of a Banana: 0.75in

  • Length of a Banana: 7.5in

  • Area of a Banana = Width x Length

  • Width of a Football Field: 1,920in

  • Length of a Football Field: 3,600in

  • Area of a Football Field: Width x Length

  • Final Count: Football Field Area / Banana Area

Python Base Example:

# Dimensions of Banana
banana_width = 0.75  # inches
banana_length = 7.5  # inches
banana_area = banana_width * banana_length

# Dimensions of Football field
football_field_width = 1920  # inches
football_field_length = 3600  # inches
football_field_area = football_field_width * football_field_length

bananas_fit = football_field_area / banana_area

print("{} bananas could fit in a football field".format(bananas_fit))
# prints: 1228800.0 bananas could fit in a football field
# // rouhgly 480

Language List

  1. ABC
  2. ActionScript
  3. Ada
  4. ALGOL
  5. Algol68
  6. Apex
  7. APL
  8. Assembly (x86 or ARM)
  9. AWK
  10. Ballerina
  11. Bash/Shell Script
  12. BCPL
  13. Boo
  14. Bourne Shell (sh)
  15. C
  16. C#
  17. C++ - ✅
  18. Chapel
  19. Clojure
  20. COBOL
  21. Cobra
  22. CoffeeScript
  23. ColdFusion
  24. Crystal
  25. D
  26. Dart
  27. Eiffel
  28. Elixir
  29. Emacs Lisp
  30. Erlang
  31. F# - ✅
  32. Factor
  33. Forth
  34. Fortran
  35. FreeBASIC
  36. GAMS
  37. GML (GameMaker Language)
  38. Go
  39. Groovy
  40. Haskell
  41. Haxe
  42. Icon
  43. Idris
  44. Inform
  45. Io
  46. J
  47. Java - ✅
  48. JavaScript - ✅
  49. JScript
  50. Julia
  51. Kotlin
  52. KRL
  53. LabVIEW
  54. Lisp (Common Lisp, Scheme)
  55. LiveScript
  56. Lua
  57. M (MUMPS)
  58. ML (Standard ML, SML)
  59. Modula-2
  60. Neko
  61. Nim
  62. Objective-C
  63. OCaml
  64. OpenCL
  65. Pascal
  66. Perl
  67. PHP
  68. Picolisp
  69. PL/I
  70. PostScript
  71. PowerShell
  72. Prolog
  73. PureScript
  74. Python - ✅
  75. Q#
  76. R
  77. Racket
  78. REBOL
  79. Red
  80. Rexx
  81. Ring
  82. Ruby
  83. Rust
  84. S-Lang
  85. Scala
  86. Scheme
  87. Smalltalk
  88. SNOBOL
  89. SPARK
  90. Squirrel
  91. Swift
  92. Tcl
  93. Turing
  94. TypeScript
  95. VB.NET
  96. Verilog
  97. VHDL
  98. Zsh