Welcome, Guest
Username: Password: Remember me

TOPIC: Basic Computer Programming

Basic Computer Programming 3 years 5 months ago #5316

  • Vororo
  • Vororo's Avatar
  • Offline
  • Platinum Member
  • Posts: 334
  • Thank you received: 1047
  • Karma: 15
Basic computer programming for beginners:

// This program is issued under the GPL (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).
Last Edit: 3 years 5 months ago by Vororo.
The administrator has disabled public write access.
The following user(s) said Thank You: klhilde, CJ, Paul-Jarman-facebook, Tina-Hill-facebook, zhuk, isaing4

Basic Computer Programming 3 years 5 months ago #5317

  • Paul-Jarman-facebook
  • Paul-Jarman-facebook's Avatar
  • Offline
  • Moderator
  • The gypsy woman told my mother Before I was born
  • Posts: 383
  • Thank you received: 660
  • Karma: 9
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
The administrator has disabled public write access.

Basic Computer Programming 3 years 5 months ago #5318

That's genius Vororo!
Maybe share in the pit of EvilJoy? :silly: :woohoo:
SVR 24
The administrator has disabled public write access.

Basic Computer Programming 3 years 5 months ago #5319

  • Vororo
  • Vororo's Avatar
  • Offline
  • Platinum Member
  • Posts: 334
  • Thank you received: 1047
  • Karma: 15
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).
The administrator has disabled public write access.

Basic Computer Programming 3 years 5 months ago #5320

  • klhilde
  • klhilde's Avatar
  • Offline
  • Elite Member
  • Posts: 253
  • Thank you received: 503
  • Karma: 6
Brilliant!

Thanks for the permission, but I had already stolen it ... on my facebook wall .... with proper credit of course.
The administrator has disabled public write access.
The following user(s) said Thank You: Vororo

Basic Computer Programming 3 years 5 months ago #5454

  • Jimmy6429
  • Jimmy6429's Avatar
  • Offline
  • Moderator
  • Posts: 51
  • Thank you received: 105
  • Karma: 2
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
The administrator has disabled public write access.
The following user(s) said Thank You: Vororo, zhuk, isaing4

Basic Computer Programming 3 years 5 months ago #5463

  • zhuk
  • zhuk's Avatar
  • Offline
  • Platinum Member
  • Posts: 551
  • Thank you received: 502
  • Karma: 3
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
The administrator has disabled public write access.
Time to create page: 0.122 seconds

Copyright © 2015-2019 FixHepC

Back to Top