Day: May 30, 2021

Learn Python By Example – while Statement

while Statement Import the random module import random Create a variable of the true number of deaths of an event deaths = 6 Create a variable that is denotes if the while loop should keep running running = True while running is True while running: /* Create a variable that randomly create a integer between …

Learn Python By Example – if and if else

if and if else Create a variable with the status of the conflict. 1 if the conflict is active 0 if the conflict is not active unknown if the status of the conflict is unknwon   conflict_active = 1 If the conflict is active print a statement if conflict_active == 1: print(‘The conflict is active.’) …