Skip to content · ⁨Passer au contenu⁩

Ask for two things · ⁨Demandez deux choses⁩

English

Ask for two things

Read a colour, then an animal. Print them on one line with a space between: for red and fox, print "red fox".

Each input() reads ONE line, so two things need two calls — and each needs its own variable, or the second overwrites the first.

Français

Demander deux choses

Lisez une couleur, puis un animal. Imprimez-les sur une ligne avec un espace entre : pour red et fox, imprimez "red fox".

Chaque input() lit UNE ligne, donc deux choses nécessitent deux appels — et chacune a besoin de sa propre variable, sinon la seconde écrase la première.

Log in or create account · ⁨Se connecter ou créer un compte⁩

IGCSE, A-Level & AP