Challenge: Device Boots Count
Tarea
Swipe to start coding
Imagine that you work in a company that produces devices. You have been tasked with developing a function that will count the number of boots on this device: with each boot, the device must increase the number of boots by 1.
- Define the
bootsvariable in the global scope. - Make changeable the
bootsglobal variable inside theboot()function local scope. - Increase the
bootsvariable by 1 inside theboot()function. - If the device is booting for the first time, display a message:
"The device boot for the first time". - If the device is booting 2+ times, display a message:
"The device boot N times", where N is abootsvariable.
Solución
¿Todo estuvo claro?
¡Gracias por tus comentarios!
Sección 1. Capítulo 5
single
Pregunte a AI
Pregunte a AI
Pregunte lo que quiera o pruebe una de las preguntas sugeridas para comenzar nuestra charla
Awesome!
Completion rate improved to 6.67
Challenge: Device Boots Count
Desliza para mostrar el menú
Tarea
Swipe to start coding
Imagine that you work in a company that produces devices. You have been tasked with developing a function that will count the number of boots on this device: with each boot, the device must increase the number of boots by 1.
- Define the
bootsvariable in the global scope. - Make changeable the
bootsglobal variable inside theboot()function local scope. - Increase the
bootsvariable by 1 inside theboot()function. - If the device is booting for the first time, display a message:
"The device boot for the first time". - If the device is booting 2+ times, display a message:
"The device boot N times", where N is abootsvariable.
Solución
¿Todo estuvo claro?
¡Gracias por tus comentarios!
Sección 1. Capítulo 5
single