Python · Exercise 1 of 6Next
Beginner
Swap two drinks
The program remembers two drinks in the variables first and second. Swap them in one line, so that first holds "coffee" and second holds "tea".
The last line prints both names. After your swap it must print coffee tea.
What Check tests
firstis now"coffee"secondis now"tea"- The swap uses the names, not retyped words
- The program prints
coffee tea
Stuck? One hint at a time
The solution unlocks after your first Check. Try first: that is where the learning happens.
main.py
Sign in to run your code.
Output
Press Run to see what your program prints.