Question

In: Computer Science

ReDo the example problem to include other populations, not just those who are female and more...

ReDo the example problem to include other populations, not just those who are female and more or less mature. What student populations will you need to account for? How many are really just sub-sets of other populations? What will you name the groups to 1) Be more verbally inclusive to populations, and 2) Provide meaning to coders that come months / years after you have?

IF student_attendance = part_time THEN
   IF student_gender = female THEN
     IF student_age > 21 THEN
         add 1 to mature_female_pt_students
     ELSE
         add 1 to young_female_pt_students
      ENDIF
   ELSE
    add 1 to male_pt_students
    ENDIF
ELSE
   add 1 to full_time_students
ENDIF

Edit the above example to include more populations (other types of students other than part time females) Please help with an example(s)!

Solutions

Expert Solution

Following are the updates which are done in the above given

  1. The student age with >42 is also added which is there for old.
  2. The division based on Gender is also done for the male.
  3. One new type of attendance is also added.
IF student_attendance = part_time THEN
       IF student_gender = female THEN
             IF student_age > 42 THEN
                 add 1 to old_female_pt_students
             ELSE IF student_age > 21 THEN
                 add 1 to mature_female_pt_students
             ELSE
                 add 1 to young_female_pt_students
             ENDIF
       ELSE
            IF student_age > 42 THEN
                add 1 to old_male_pt_students
            ELSE IF student_age > 21 THEN
                add 1 to mature_male_pt_students
            ELSE
                add 1 to young_male_pt_students
            ENDIF
       ENDIF
ELSE IF student_attendance = over_time THEN
   IF student_gender = female THEN
         IF student_age > 42 THEN
             add 1 to old_female_ot_students
         ELSE IF student_age > 21 THEN
             add 1 to mature_female_ot_students
         ELSE
             add 1 to young_female_ot_students
         ENDIF
   ELSE
         IF student_age > 42 THEN
            add 1 to old_male_ot_students
         ELSE IF student_age > 21 THEN
             add 1 to mature_male_ot_students
         ELSE
             add 1 to young_male_ot_students
         ENDIF
   ENDIF
ELSE
   IF student_gender = female THEN
         IF student_age > 42 THEN
             add 1 to old_female_ft_students
         ELSE IF student_age > 21 THEN
             add 1 to mature_female_ft_students
         ELSE
             add 1 to young_female_ft_students
         ENDIF
   ELSE
        IF student_age > 42 THEN
             add 1 to old_male_ft_students
         ELSE IF student_age > 21 THEN
             add 1 to mature_male_ft_students
         ELSE
             add 1 to young_male_ft_students
         ENDIF
   ENDIF
ENDIF

That was a nice question to answer
Friend, If you have any doubts in understanding do let me know in the comment section. I will be happy to help you further.
Please like if you think effort deserves like.
Thanks


Related Solutions

“Unexpected inflation is more beneficial to those who save than those who borrow.” Evaluate this statement....
“Unexpected inflation is more beneficial to those who save than those who borrow.” Evaluate this statement. How does your answer change if the inflation is expected? Please elaborate
1. In a metapopulation, source populations are likely to have more individuals dispersing to other habitat...
1. In a metapopulation, source populations are likely to have more individuals dispersing to other habitat patches. This means that the source population: 2. Studies show that lean individuals and obese individuals differ in the bacterial species composition in their guts. It was hypothesized that biotic and abiotic factors may interact in the human gut. Specifically, particular gut flora may alter fat metabolism and therefore body composition and weight. Which observation would best support this hypothesis? 3. The posterior end...
The goal of price discrimination is to increase _____ by charging more to those who have...
The goal of price discrimination is to increase _____ by charging more to those who have _____ demand. 1. producer surplus; less elastic 2. consumer surplus; less elastic 3. consumer surplus; more elastic 4. producer surplus; more elastic Please explain why, thank you in advance.
A researcher provides the following research hypothesis: Those who attend church more frequently will be more...
A researcher provides the following research hypothesis: Those who attend church more frequently will be more likely to vote. a. What is the independent and dependent variable here? EXPLAIN. b. What “direction” is this relationship? EXPLAIN. c. Write an appropriate null hypothesis for this research hypothesis. 2. A researcher provides the following research hypothesis: Blacks will lend money more frequently to friends and family than will Whites. a. What is the independent and dependent variable here? EXPLAIN. b. What “direction”...
(a) Using the armspanSpring2020.csv data from class, test the hypothesis that those who identify as female...
(a) Using the armspanSpring2020.csv data from class, test the hypothesis that those who identify as female have a shorter armspan than those who do not so identify. Write out the null and alternative hypotheses, give the value of the test statistic and the p-value, and state your conclusion using a 5% significance level. Use R for all computations. (b) Interpret, in your own words, the meaning of the p-value you got in part (a). (c) Find a 95% confidence interval...
Describe the cardiac cycle in more detail. Include valve actions and the forces that cause those...
Describe the cardiac cycle in more detail. Include valve actions and the forces that cause those valve actions.
What is an example of the null hypothesis? People in red are more attractive than those...
What is an example of the null hypothesis? People in red are more attractive than those in blue There is no differences in ratings of attraction There is a difference in attraction ratings for those who ware the color red and those who ware blue. Support research hypothesis
what is disintermediation?think of an example(other than those given in the chapter)of a company that has...
what is disintermediation?think of an example(other than those given in the chapter)of a company that has been disintermediated and one that has disintermediated another type of company. Do you think bricks-and-mortar retailers will ever be completely distintermediated?
How are elections won? In other words, what distinguishes candidates who win from those who lose?...
How are elections won? In other words, what distinguishes candidates who win from those who lose? Have these factors changed over time? Are the current factors that influence electoral outcomes positive or negative for a democratic society? Explain and provide examples.
could cost variances be caused by the actions of people other than those who are "typically"...
could cost variances be caused by the actions of people other than those who are "typically" responsible for such variances in the organization? What would be some examples?
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT