Home Forums Main Forum Media & News Research and Trials Basic Computer Programming

  • This topic has 6 replies, 6 voices, and was last updated 9 years ago by Avatar photozhuk.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #6400
    Avatar photoVororo
    • Guardian Angel
    • ★★★★★
    @vororo

    Basic computer programming for beginners:

    // This program is issued under the GPL (https://en.wikipedia.org/wiki/GNU_General_Public_License) which allows everyone
    // the freedom to study, run, share (copy) and modify the software. Copyright (C) X. Vororo, 2015.

    WHILE (gilead-patents = true) DO

    IF (patient-lives = europe OR patient-lives = america) THEN

    IF (patient-fibrosis >= F3) THEN
    treatment MIGHT BE AVAILABLE in national health system
    GOTO GILEAD-HEAVEN // warning tickets $ 80 000 per head
    ELSE
    treatment NOT AVAILABLE in national health service
    PAUSE
    ENDIF

    IF (patient-reads = “fixHepC”;) THEN
    generic treatment AVAILABLE
    ELSE
    PAUSE
    ENDIF

    ELSE // (patient lives in low income country)

    IF (patient-earns >= 10 *average-national-income) THEN
    generic treatment AVAILABLE
    ELSE
    request bank loan
    if (patient-loan = approved) THEN
    generic treatment AVAILABLE
    ELSE
    PAUSE
    ENDIF
    ENDIF

    ENDIF

    DONE

    Homework:

    Q1. Easy. Explain in simple words the effect of the WHILE statement.

    Q2. Medium. Replace each PAUSE statement by “SLEEP X” where X is the correct number of years based on Gilead’s current patents.

    Q3. Hard. Everyone knows that GOTO statements are dangerous in computer programs. Modify the above program to eliminate the nasty GOTO statement.

    Q4. Advanced. Write a new program that does not use GOTO or PAUSE statements. Hint. You are allowed to change the unit price of the medicine and/or travel to a foreign country.


    Diagnosed Jan 2015: GT3, A0+F0/F1. Fatigue + Brain-Fog.
    Started Sof+Dac from fixHepC 10-Nov-2015. NO sides.
    Pre-Tx: AST 82, ALT 133, Viral Load 1 900 000.
    Week4: AST 47, ALT 58. VL < 15 (unquantifiable). Week12 (EOT): AST 30, ALT 26, VL UND Week16 (EOT+4): AST 32, ALT 28, GGT 24, VL UND Week28 (EOT+16): AST 26, ALT 22, GGT 24, VL UND Ever grateful to Dr James. Relapsed somewhere after all that... Bummer! Jan 2018: VL 63 000 (still GT3).

    #6401
    Avatar photoPaul-Jarman-facebook
    • Guardian Angel
    • ★★★★★
    @paul-jarman-facebook

    Very Clever :)

    Could I nick that please and put on a FB site, with appropriate credit to the creator ofc ?

    cheers


    Two time relapser.

    SVR 4 achieved 12/16 at last
    SVR 12 achieved 22/02/2017 The Bastard has been defeated :):):)

    GT 3 – about 28 yrs with HCV

    #6402
    Avatar photoTina-Hill-facebook
    • Guardian Angel
    • ★★★★★
    @tina-hill-facebook

    That’s genius Vororo!
    Maybe share in the pit of EvilJoy? <img style=illy:' /> :woohoo:


    SVR 24

    #6403
    Avatar photoVororo
    • Guardian Angel
    • ★★★★★
    @vororo

    Thanks folks. I added a GPL. Copy / re-use as much as you like :)


    Diagnosed Jan 2015: GT3, A0+F0/F1. Fatigue + Brain-Fog.
    Started Sof+Dac from fixHepC 10-Nov-2015. NO sides.
    Pre-Tx: AST 82, ALT 133, Viral Load 1 900 000.
    Week4: AST 47, ALT 58. VL < 15 (unquantifiable). Week12 (EOT): AST 30, ALT 26, VL UND Week16 (EOT+4): AST 32, ALT 28, GGT 24, VL UND Week28 (EOT+16): AST 26, ALT 22, GGT 24, VL UND Ever grateful to Dr James. Relapsed somewhere after all that... Bummer! Jan 2018: VL 63 000 (still GT3).

    #6404
    Avatar photoklhilde
    • Guardian Angel
    • ★★★★★
    @klhilde

    Brilliant!

    Thanks for the permission, but I had already stolen it … on my facebook wall …. with proper credit of course.

    #6536
    Jimmy6429
    • Topics: 0
    • Replies: 52
    • Total: 52
    • Recovery Champion
    • ★★★★
    @jimmy6429

    On day 4 I had some bad sides, went a bit nutso and posted me disturbing stuff on one of my sites, late that day a friend sent me the following;
    10 DAY = “0”

    20 IF [$DAY < 84] THEN GOTO 40 30 ELSE GOTO 50 40 INPUT “Generic” 50 CLS 60 PRINT within “Smile” 70 LIFE = $PERCEPTION 80 RECALL “You are loved” 90 DAY = [$DAY+1] 100 GOTO 10 nice to have friends,, jim


    3 years cured, Sof/Dac, thanks Doc Freeman, hepc only a distant memory, go for it ppl

    #6545
    Avatar photozhuk
    • Guardian Angel
    • ★★★★★
    @zhuk

    Lol, nice! :)


    GT1a since 1988, diagnosed 1990
    F0, tx naive
    VL 262,000 ALT 40 AST 26 GGT 13 Fibroscan 04/12/15 – 2.9
    Started Mesochem sof/dac 12 weeks 01/01/2016
    11/02/2016 – 6 weeks UNDETECTED
    AST 26
    ALT 26

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.