Skip to content · ⁨דלג לתוכן⁩

Ask for two things · ⁨בקש שני דברים⁩

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.

עברית

בקש שני דברים

קרא צבע, ולאחר מכן בעל חיים. הדפס אותם בשורה אחת עם רווח ביניהם: עבור red ו-fox, הדפס "red fox".

כל input() קורא שורה אחת, לכן שני דברים דורשים שתי שיחות — וכל אחד מהם צריך משתנה משלו, אחרת השני ימחוק את הראשון.

Log in or create account · ⁨היכנס או צור חשבון⁩

IGCSE, A-Level & AP