Question: Vitec 120/bookte boolean If and Else Statements Change the code below by adding an else statement block on line 18 so that drum is placed
Vitec 120/bookte boolean If and Else Statements Change the code below by adding an else statement block on line 18 so that drum is placed on track 2 if drums fails to be added. When Run, there should be a 33% chance for drunk, and a chance for drun. Notice that this is identical to the previous EarSketch exercise but uses anelse statement instead of a second statement 1 2 from randon import randint from earsketch import init setTempo (115) 5 7 lead - EIGHT BIT ATARI LEAD 007 8 drumA - EIGHT_BIT ANALOG DRUV LOOP_001 9 drunB - EIGHT BIT_ANALOG DRUN LOOP_008 11 insertMedia(lead. 1. 1) 13 r randint(1, 3) 15 16 if r 1: insertMediadruna. 2. 1) 18 # add else statement block here 21 finish Audio of the answer with Audio of the answer with drum Mods Opie 93 DALL
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
