[ / / / / / / / / / / / / / ] [ dir / random / 93 / biohzrd / hkacade / hkpnd / tct / utd / uy / yebalnia ]

/prog/ - Programming

Programming
Name
Email
Subject
REC
STOP
Comment *
File
Password (Randomized for file and post deletion; you may also set your own.)
Archive
* = required field[▶Show post options & limits]
Confused? See the FAQ.
Options

Allowed file types:jpg, jpeg, gif, png, webp,webm, mp4, mov
Max filesize is16 MB.
Max image dimensions are15000 x15000.
You may upload5 per post.


File: 2515ff4280cb6d9⋯.png (145.04 KB,1021x1622,1021:1622,theoutcomeEdited.png)

a37c8a No.4519

Pic related, /prog/

____________________________
Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

a37c8a No.4520

File: 6c2f03156acffc5⋯.png (65.57 KB,906x660,151:110,1477019738451.png)

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

a37c8a No.4521

>Python

>not Prolog

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

a37c8a No.4547

* You use tons of functions you don't declare; you only import randint

* you set tons of local variables inside the outcomeOfElection function but do nothing with them

* "global" doesn't work like that in python (world_war is already a global variable. "global" is used to access global variables, not create them. They're created by scope. If anything, they're badly named, because they don't access a "global" scope, just the module scope). All your world_war assignments in the function apply to local variables in the function

* You use `if not Trump_wins` followed by `if Trump_wins`, but they are the only members in the loop and "Trump_wins" isn't changed by the loop, so it's functionally no different from an `if … else`

* You use "while not civil_war", but you break on every set of civil_war and return nothing. In fact, your "outcomeOfElection" appears to simply to run, set nothing external, and return nothing.

* You use some bizarre combination of `investigation_occurs` and `investigation(occurs)`. Are these supposed to represent the same value?

* Your casing is inconsistent. I can understand Trump, but Fraud_Found is just title case out of nowhere.

* MAGA just prints "*MAGA*"? Points off for uncreativity.

* In fact, every single one of your conditionals is `if foo` and `if not foo` instead of an if else. Have you never learned the fucking else statement?

* You can't assign one value to two variables. That syntax treats the left as a tuple (the structure designating the tuple is the comma, not parens; play with it in your REPL), so the right side needs to be an iterable (even custom iterables and generators work, mind you).

Did you even try to run this shit? F; does not run.

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.



[Return][Go to top][Catalog][Nerve Center][Random][Post a Reply]
Delete Post [ ]
[]
[ / / / / / / / / / / / / / ] [ dir / random / 93 / biohzrd / hkacade / hkpnd / tct / utd / uy / yebalnia ]