Help creating a procedure in my calendar app

I need help creating a procedure in my calendar app. I am trying to create a procedure that can change the color of a day based on what type of event it is.
But the procedure should

  • Contain and uses one or more parameters that have an effect on the functionality of the procedure.
  • Implement an algorithm that includes sequencing, selection, and iteration.

What have you tried?

What event do you have?

what's this?

The event can be anything its just I need the procedure to have parameters.

  • Sequence– the order we want the computer to execute the instructions we provide as programmers. For example, do this first, then do this, then do that, and so forth. (if then statement)
  • Selection– selecting which path of an algorithm to execute depending on some criteria. For example, if you passed a class in school, then we execute the operations that clap and cheer and play a song. But if you didn’t pass the class, then maybe we would say, “Better luck next time, hang in there!” (do result)
  • Iteration– looping or repeating. Many times, we want to be able to repeat a set of operations a specific number of times or until some condition occurs. (loop)

the original said type of event, it should have been just an event. The code works i have other code where the user can change the colors and stuff of the events and weekends, but i dont know how to work around the constraints

Use the blue gear at
image

It looks like not a single procedure, you may need several ones.

yes i know, but i don't know how i would implement parameters in that procedure.

maybe you can give an example, what input data is, and what output you want?

Input: colorchoice
Output: the color the user wants

This does not help a lot.

I need real data.

i don't know what you mean.

you need to explain in details

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.