How to create a digital clock variable in Scratch

preview_player
Показать описание


━━━━━━━━━━━━━

Learn how to display the time in Scratch!

Create a variable called "time" and put it inside a forever loop attached to a green flag. To display the hour, drag in the "current hour" block. For the minutes, use join blocks to combine the hour with the minutes, adding a colon between them to avoid blending the numbers.

To display the seconds, repeat the process with the "current second" block. Double-click or right-click on the variable on the stage to change how it looks in your project.

Check out the links above for more free Scratch videos, projects, lessons, tips, etc. If you'd like to learn how to teach computer science education with your students, check out the #CSK8 Podcast in the link above to explore research, experiences, and perspectives on computer science education through interviews with computer science educators, scholars, and administrators, as well as episodes that summarize and unpack implications of research for classroom teachers who are interested in learning more about practical applications of research in their classroom.

#scratch #JaredOLeary

━━━━━━━━━━━━━

00:00 Create a Time variable in Scratch
00:05 Display the hour
00:08 Display the minute
00:20 Display the seconds
Рекомендации по теме
Комментарии
Автор

Thanks, I used to watch your tutorials all the time. Can’t believe you’re still posting :)

Tkw
Автор

Thanks for the tutorial! Is there a way not to make the time go past 12:59 and just go to 1:00? I used the -12 code but then I get negative time.

Artist_Aiden
Автор

but when the minute is 0, 1, 2, 3, 4, 5, 6, 7, 8 or 9, it doesn't display for example 12:08, it displays 12:8

Olivixiri
Автор

How do you make the clock not in 24 hour format

ItsFrezeyy
Автор

You could turn this into a tutorial on how to make a clock with sprites and costumes

thisislemmngs
Автор

HELP
When i did it it worked and all and i made the exact thing you made with the seconds but it doesnt work with the 0 you have to turn it on and off else it will show :9 or :045 how do i fix it?
and i did the exact same code as you

UnRandom-og
visit shbcf.ru