Hey there! Sign in to join this conversationNew here? Join for free
    • Thread Starter
    Offline

    1
    ReputationRep:
    How do you set a disease trigger point in the coding?
    • TSR Support Team
    Online

    21
    ReputationRep:
    TSR Support Team
    (Original post by akirne39)
    How do you set a disease trigger point in the coding?
    I would suggest you add a bit more context to it as anyone not doing this task won't have a clue. I have been doing this task so I understand what you mean, but many won't. To add a disease trigger point, you need to get the user to input a value which they want to use as the trigger point. Then, you need to validate it and save it to a variable as you would have done for the other values earlier. Next, you go to the section where you are calculating the values for the next generation and add an if statement.
    If total=< diseaseTrigger then
    do as you were doing before
    Else calculate a disease factor randomly between 0.2 and 0.5
    do the stuff but with the juveniles and seniles affected by the disease factor
    End if
    HTH I'm happy to answer any other questions you have as I've almost completed this now Red is for every other line in the code as the formatting on TSR is really messed up atm
    • Thread Starter
    Offline

    1
    ReputationRep:
    (Original post by Lemur14)
    I would suggest you add a bit more context to it as anyone not doing this task won't have a clue. I have been doing this task so I understand what you mean, but many won't. To add a disease trigger point, you need to get the user to input a value which they want to use as the trigger point. Then, you need to validate it and save it to a variable as you would have done for the other values earlier. Next, you go to the section where you are calculating the values for the next generation and add an if statement. If total=< diseaseTrigger then do as you were doing before Else calculate a disease factor randomly between 0.2 and 0.5 do the stuff but with the juveniles and seniles affected by the disease factor End if HTH I'm happy to answer any other questions you have as I've almost completed this now Red is for every other line in the code as the formatting on TSR is really messed up atm
    thank you very much
 
 
 
  • See more of what you like on The Student Room

    You can personalise what you see on TSR. Tell us a little about yourself to get started.

  • Poll
    Brussels sprouts
    Useful resources

    Study tools

    Rosette

    Essay expert

    Learn to write like a pro with our ultimate essay guide.

    Thinking about uni already?

    Thinking about uni already?

    See where you can apply with our uni match tool

    Student chat

    Ask a question

    Chat to other GCSE students and get your study questions answered.

    Creating

    Make study resources

    Create all the resources you need to get the grades.

    Planner

    Create your own Study Plan

    Organise all your homework and exams so you never miss another deadline.

    Resources by subject

    From flashcards to mind maps; there's everything you need for all of your GCSE subjects.

    Papers

    Find past papers

    100s of GCSE past papers for all your subjects at your fingertips.

    Help out other students

    Can you help? Study help unanswered threads

    Groups associated with this forum:

    View associated groups
  • See more of what you like on The Student Room

    You can personalise what you see on TSR. Tell us a little about yourself to get started.

  • The Student Room, Get Revising and Marked by Teachers are trading names of The Student Room Group Ltd.

    Register Number: 04666380 (England and Wales), VAT No. 806 8067 22 Registered Office: International House, Queens Road, Brighton, BN1 3XE

    Quick reply
    Reputation gems: You get these gems as you gain rep from other members for making good contributions and giving helpful advice.