[old] Humpty Dumpty Form

[old] Humpty Dumpty Form

Undefined
DE EN 日本語

「たまごそっくりに見えるって申し上げたんです」アリスは穏やかに説明した。 「それからご存知の通りたまごは非常に美しいのです」 彼女は彼がこっちを向いてくれるをことを期待してお世辞を付け加えた。

「一部の人々は」ハンプティ・ダンプティは相変わらず彼女から目をそらしながら言った。 「赤ん坊以下の分別しかない!」

アリスは何と返していいか分からなかった: これでは全く会話になっておらず、彼はなにも言ってないのと同じだと思った; 実際に彼の最後の言葉は明らかに木に向けてのものであった。 ...

ニコラはこの一説を読み終えて自分だけの「ハンプティ・ダンプティ」を作りたくなった。 彼は回転楕円を元にすることにした。 (詳細はWikipediaを参照). 私たちはこの回転楕円の高さと幅(単位:インチ)を知っている。ニコラはこの作業においてどれだけの原料が必要か知る必要があった。

あなたは体積(立法インチ)と表面積(平方インチ)を計算する関数を作って彼を手伝うことができる。

spheroid spheroid

ヒント:sin-1xに気を付けよう -- これは arcsinである。

入力: 2引数。 高さと幅。(integer型)

出力: 体積と表面積。(float型のリスト) 精度は小数点第2位とする。.

例:

spheroid(4, 2) == [8.38, 21.48]
spheroid(2, 2) == [4.19, 12.57]
spheroid(2, 4) == [16.76, 34.69]
どのように使われるか:

これは単純な数学の問題である。 しかし円形楕円という素晴らしい形を紹介したかった。(もしあなたがまだ聞いたことがなければだが)

様々なスポーツ(ラグビーやオーストラリアンフットボールなど)のボールは長球(上下に長い楕円)である アメリカンフットボールではより尖った長球を使う。 太陽系のいくつかの衛星は長球に近い形をしている。 土星の衛星のミマス、エンケラドゥス、テティス、天王星の衛星ミランダなどがそれである。

地球の本当の形はごく僅か上下に短い扁球と呼ばれるものである。 北極と南極間の最短の直径はおよそ 12,714km である。 赤道付近の最長の直系はおよそ 12,756km であり これは地球が完全な球でないことを意味する。

事前条件: 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