Ask for two things · בקש שני דברים
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() קורא שורה אחת, לכן שני דברים דורשים שתי שיחות — וכל אחד מהם צריך משתנה משלו, אחרת השני ימחוק את הראשון.
Read a colour, then an animal. Print them on one line with a space between: for red and fox, print "red fox". · קרא צבע, ולאחר מכן בעל חיים. הדפס אותם בשורה אחת עם רווח ביניהם: עבור red ו-fox, הדפס "red fox".
Click Run to see the output here. · לחץ על הרץ כדי לראות את התוצא כאן.