[old] Humpty Dumpty Form

[old] Humpty Dumpty Form

Undefined
Deutsch EN JA

„Ich sagte nur, daß Sie einem Ei gleichen, mein Herr," erklärte Alice sanft, „und manche Eier sind sehr hübsch." fügte sie hinzu. Sie hoffte dadurch ihre Bemerkung in eine Art Kompliment zu verwandeln.

„Manche Leute," sagte Plumpsti Bumsti, und schaute wie immer von ihr weg, „haben nicht mehr Verstand wie ein Säugling."

Alice wußte nicht, was sie dazu sagen sollte; sie fühlte sich gar nicht getroffen, denn er sagte niemals etwas zu ihr; seine letzte Bemerkung war sogar offenbar an einen Baum gerichtet. So stand sie und murmelte leise den Kinderreim vor sich hin:

„Plumpsti Bumsti saß auf einem Wall,
Plumpsti Bumsti tat einen großen Fall,
Alle Mannen des Königs und alle Reiter des Lands
Machen Plumpsti Bumsti nimmer wieder ganz."

„Schwatz nicht so mit dir selber," sagte...

Du kannst ihm helfen und eine Funktion programmieren, welche das Volumen (in Kubikzoll) und die Oberfläche (in Quadratzoll) berechnet.

spheroid spheroid

Tips: Pass auf mit sin-1x -- das ist der Arkussinus.

Eingabe: Zwei Argumente. Eine Höhe und Weite als Ganzzahlen.

Ausgabe: Das Volumen und die Fläche als Liste von Gleitpunktzahlen. Die Ergebnisse müssen auf zwei Nachkommastellen genau sein.

Beispiel:

spheroid(4, 2) == [8.38, 21.48]
spheroid(2, 2) == [4.19, 12.57]
spheroid(2, 4) == [16.76, 34.69]
Wozu das gut ist:

Das ist zwar nur eine simple Mathematikaufgabe, aber wir möchten Dich dabei einer famosen Form vorstellen -- dem Rotationsellipsoid, oder auch Sphäroid. (Falls Du noch nie davon gehört hast)

Das verlängerte Rotationsellipsoid hat die Form eines Balles verschiedener Sportarten, wie Rugby oder Australian Football. Jene des American Football ist ein verlängertes Sphäroid mit spitzen Enden. Etliche Monde des Sonnensystems entsprechen ungefähr einem verlängerten Rotationsellipsoid, genau genommen sind sie aber ungleichseitig. Beispiele sind Mimas, Enceladus und Tethys, welche den Saturn umkreisen, und Miranda im Orbit des Uranus.

Die echte Form der Erde wird abgeplattetes Rotationsellipsoid genannt, obwohl ihre Pole nur ganz leicht abgeplattet sind. Der Durchmesser vom Nord- zum Südpol (der kürzeste Durchmesser) ist ungefähr 12,714 km. Der Äquatordurchmesser (der längste Durchmesser) ist ungefähr 12,756 km. Das ist kein großer Unterschied, aber er zeigt, die Form der Erde entspricht nicht ganz einer Kugel.

Bedingung: 0 < width < 100
0 < height < 100

You should be an authorized user in order to see the full description and start solving this mission.
Settings
Code:
Other:
Invalid hot key. Each hot key should be unique and valid
Hot keys:
CheckiO Extensions

CheckiO Extensions allow you to use local files to solve missions. More info in a blog post.

In order to install CheckiO client you'll need installed Python (version at least 3.8)

Install CheckiO Client first:

pip3 install checkio_client

Configure your tool

checkio --domain=js config --key=

Sync solutions into your local folder

checkio sync

(in beta testing) Launch local server so your browser can use it and sync solution between local file end extension on the fly. (doesn't work for safari)

checkio serv -d

Alternatevly, you can install Chrome extension or FF addon

checkio install-plugin
checkio install-plugin --ff
checkio install-plugin --chromium

Read more here about other functionality that the checkio client provides. Feel free to submit an issue in case of any difficulties.

Pair Programming (Beta-version)

Welcome to Pair Programming! Engage in real-time collaboration on coding projects by starting a session and sharing the provided unique URL with friends or colleagues. This feature is perfect for joint project development, debugging, or learning new skills together. Simply click 'Start Session' to begin your collaborative coding journey!

Waiting for Pair Programming to start...

You are trying to join a pair programming session that has not started yet.

Please wait for the session creator to join.

Waiting for Pair Programming to reconnect...

It looks like the creator of the pair programming session closed the editor window.

It might happen accidentally, so that you can wait for reconnection.

×
 
 
<< <
> >>
exec show

Whats Next?

Free accounts will see Best CheckiO solutions with some delay.
Best Solutions will be opened in a moment
Become Awesome and Don't wait
The next stage is ""
Will be activated in
View More Solutions Random Review Solutions Go to the next mission