Skip to main content
4 of 7
deleted 15 characters in body
Olivier Grégoire
  • 14.4k
  • 3
  • 32
  • 56

Java (JDK 10), 163 bytes

s->new double[]{2,5.8,2.7,1.45,1.2,2.8,3.4,2.1,.7,1.85}[s.chars().map(c->c==47?124:c==103?0:c).sum()%123%42%25%20%14]*(278-s.charAt(0))/154*(s.endsWith("g")?.75:1)

Try it online!

Credits

Olivier Grégoire
  • 14.4k
  • 3
  • 32
  • 56