Homework: Get a number from the user, then check what day of the week this number is

Get a number from the user, then check what day of the week this number is .
if the number 7 is Friday, when the user enters the number 14, the program should show Friday

1 % 7 = 1 Sa
2 % 7 = 2 Su
.
.
.
7 % 7 = 0 Fr

13 % 7 = 6 = Th
18 % 7 = 4 Tu

You can do it using Maths block.

That's a nice task for a homework... what did you try? Please show a screenshot of your relevant blocks to get help..

A very good way to learn App Inventor is to read the free Inventor's Manual here in the AI2 free online eBook App Inventor 2 Book: Create Your Own Android Apps ... the links are at the bottom of the Web page. The book 'teaches' users how to program with AI2 blocks.
There is a free programming course here Course In A Box and the aia files for the projects in the book are here: App Inventor 2 Book: Create Your Own Android Apps
How to do a lot of basic things with App Inventor are described here: How do you...? .

Also do the tutorials Tutorials for MIT App Inventor to learn the basics of App Inventor, then try something and follow the Top 5 Tips: How to learn App Inventor

Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by icon24 Taifun.

1 Like

As a start time, use the clock component to return an instant, then use the date/time format block to return the day number. In a sense you need to reverse engineer this :wink:

Excuse me, I just started, I hope you can guide me in the blocks

Is your instructor fine with others doing your homework?

See the tips from @RamNaresh and use some math blocks... if you got stuck, then provide a screenshot of your relevant blocks...

Taifun

Thanks, I don't know much. I could not find anything. I wanted to know if there is anyone who has these blocks ready for this project so that I can make them through screen shot blocks.

Yes, blocks are ready at Create Apps! Orange Button, left upper corner, but you need to rearrange them according to your requirement. and...

2 Likes

Some math blocks to study:

  • quotient
  • remainder
  • modulo

Also see the list block, LOOKUP IN PAIRS, or SELECT ITEM IN LIST.