Seção 4. Capítulo 3
single
Challenge: The Digital Tea Kettle
Deslize para mostrar o menu
Tarefa
Deslize para começar a programar
Create a coroutine that simulates a digital tea kettle boiling water.
- Define a coroutine function called
boil_waterusing theasynckeyword. - Inside the coroutine, print
"Kettle is on...". - Simulate boiling for 3 seconds.
- After the wait, print
"Ding! Water is boiled.".
Your code should produce: Kettle is on... waits for 2 seconds Ding! Water is boiled.
Solução
Tudo estava claro?
Obrigado pelo seu feedback!
Seção 4. Capítulo 3
single
Pergunte à IA
Pergunte à IA
Pergunte o que quiser ou experimente uma das perguntas sugeridas para iniciar nosso bate-papo