[Narrator] 2 + 2, we're actually pretty sure this works out.
There's no error for this one; it's going to evaluate to 4.
Down here Mars=Earth + 1.
There is actually going to be a problem here, and the problem relates to Earth,
which is a variable that's used before it's being defined,
and python's going to emit some sort of run-time error saying,
"I don't know what Earth is so I don't know how to assign Earth + 1 to the variable Mars."
This one will result in some sort of error.
Over here, we assign Mars to be 4, and that's totally fine, and then we assign
Mars to be Mars + 0 or another 4, so no errors here,
but, finally, in this last one, we take a string, Mars, and we add an integer, 2, to it,
and we don't expect addition to work on both strings and integers.
This one also leads to an error.
Mars is sometimes called the red planet, the fourth rock from the sun, and among other things,
it features very prominently in Gustav Holst's 7 movement orchestral suite, The Planets,
which was written in about 1915, worth giving a listen to if you haven't yet run into it.
2+2は確実に動くでしょう
これにエラーはありません
評価されて4を返します
こちらのMars=earth+1には
問題があります 特にearthに関してです
これは使う前に定義されていない変数なので
Pythonは“earthは正体不明なので
earth+1をMarsに代入できない”という内容の
ランタイムエラーを起こすでしょう
従ってこれはエラーを起こします
こちらではMarsに4を代入しています
その後 MarsにMars+0つまり4を代入します
エラーは起こりません
そして最後の選択肢では文字列“Mars”に
整数の2を足しています
文字列と整数の加算は成立しません
これはエラーを起こします
赤い惑星と呼ばれる火星は太陽から4番目の惑星で
グスターブ・ホルストが1915年に作曲した
7楽章からなる組曲「惑星」の1つでもあります
聴いたことがない方は一度聴いてみてください
2 + 2 -- temos certeza de que isso funciona.
Não exite erro neste aqui; e expressào avalia para 4.
Aqui -- mars = earth + 1 --
realmente há um problema aqui, e o problema está relacionado com earth,
que é uma variável que está sendo usada antes de ser definida,
e Python vai emitir algum tipo de erro de execução, dizendo:
"Eu não conheço earth e portanto não sei como atribuir earth + 1 a mars".
Este aqui resulta em um erro.
Aqui, atribuímos 4 a mars -- isso é totalmente correto, e então atribuímos
mars = mars + 0 -- de novo, 4 -- e, portanto, não há erro aqui.
Mas, finalmente, neste último, pegamos um string -- "mars"-- e somamos a ele um inteiro -- 2 --
e não se espera que a soma funcione para strings e inteiros.
Este aqui leva a um erro.
Mars é algumas vezes chamado de "o planeta vermelho", o quarto planeta a partir do Sol e, entre outras coisas,
ele atua de maneira proeminente no sétimo movimento da suite "The Planets"de Gustav Holst,
que foi escrita em 1925 -- vale à pena ouvi-la, se você nunca ouviu.