Calculating the number of bananas that can fit in a football field in various programming languages.
The goal of this project is to determine how many bananas can fit in a football field using different programming languages.
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
# 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
- ABC
- ActionScript
- Ada
- ALGOL
- Algol68
- Apex
- APL
- Assembly (x86 or ARM)
- AWK
- Ballerina
- Bash/Shell Script
- BCPL
- Boo
- Bourne Shell (sh)
- C
- C#
- C++ - ✅
- Chapel
- Clojure
- COBOL
- Cobra
- CoffeeScript
- ColdFusion
- Crystal
- D
- Dart
- Eiffel
- Elixir
- Emacs Lisp
- Erlang
- F# - ✅
- Factor
- Forth
- Fortran
- FreeBASIC
- GAMS
- GML (GameMaker Language)
- Go
- Groovy
- Haskell
- Haxe
- Icon
- Idris
- Inform
- Io
- J
- Java - ✅
- JavaScript - ✅
- JScript
- Julia
- Kotlin
- KRL
- LabVIEW
- Lisp (Common Lisp, Scheme)
- LiveScript
- Lua
- M (MUMPS)
- ML (Standard ML, SML)
- Modula-2
- Neko
- Nim
- Objective-C
- OCaml
- OpenCL
- Pascal
- Perl
- PHP
- Picolisp
- PL/I
- PostScript
- PowerShell
- Prolog
- PureScript
- Python - ✅
- Q#
- R
- Racket
- REBOL
- Red
- Rexx
- Ring
- Ruby
- Rust
- S-Lang
- Scala
- Scheme
- Smalltalk
- SNOBOL
- SPARK
- Squirrel
- Swift
- Tcl
- Turing
- TypeScript
- VB.NET
- Verilog
- VHDL
- Zsh