-
Schreibe mir bitte ein Python script, dass 50% "I don't understand" oder andere 50% "I need a cup of tea" (nicht überserzt, nur auf English!) drucken. Alle Code Comments muss auf Hindi sein. Deine erklärung auser die Code muss ins französische schreiben sein.
~~~
```
# यहाँ हम शून्य से शुरुआत करते हैं
import random
# हम एक सूची में दो विकल्प डालेंगे
options = ["I don't understand", "I need a cup of tea"]
# हम 50% के लिए एक नंबर उत्पन्न करेंगे
random_number = random.random()
# यदि नंबर 0.5 से कम है, तो हम पहला विकल्प छापेंगे
# अन्यथा हम दूसरा विकल्प छापेंगे
if random_number < 0.5:
print("I don't understand")
else:
print("I need a cup of tea")
# यह स्क्रिप्ट आपको 50% की संभावना से "I don't understand" और अन्य 50% की संभावना से "I need a cup of tea" छापेगा।
# रैंडम संख्याओं का उपयोग करने के लिए हमने random मॉड्यूल का उपयोग किया है।
```Voici un script Python qui imprimera 50% "I don't understand" et 50% "I need a cup of tea". Nous avons utilisé le module random pour générer un nombre aléatoire et imprimer une option en fonction de ce nombre. Les commentaires sont en hindi.
~~~~
(I know that code is trivial, that's not the point; I'm wondering how many requirements get lost in translation, both between languages and between jargon domains)
Also:
> # यहाँ हम शून्य से शुरुआत करते हैं
"Here we start from zero"
> import random
but then it imports a module from the standard library
FWIW, I also don't know about Francophone countries; sadly, despite the language lessons being mandatory for 5 years of my schooling, my grasp of it is so bad that even had to have my "I don't speak French" corrected.
Lemme guess: you generated that prompt by writing it in English and asking GPT (or Google translate, but not DeepL) for a German translation?
^_^;
(I assume "not DeepL" weil meine Übersetzung hat eine Irre, dass DeepL macht nicht?)