Unit 3 challenge: drawing random robot avatar
Okay how is this not correct for the bow position on step 3? I ran the code 10 times and the bow was either there or not on the head? Does it need to generated separately for the head OR the neck at a bowtie? I've wasted way too much time on this as is...
import random
import avatar
avatar.draw_eyes("medium")
bow_position = random.randint(1,3)
if bow_position == 1:
avatar.draw_bow()
avatar.draw_nose
nose_type = random.randint(1,2)
if nose_type == 1:
nose_type = avatar.draw_nose("triangle")
else:
nose_type = avatar.draw_nose("button")
avatar.draw_mouth
mouth_type = random.randint(1, 4)
if mouth_type == 1:
mouth_type = avatar.draw_mouth("smile")
if mouth_type == 2:
mouth_type = avatar.draw_mouth("smile")
if mouth_type == 3:
mouth_type = avatar.draw_mouth("neutral")
if mouth_type == 4:
mouth_type = avatar.draw_mouth("teeth")
Vous devez vous connecter pour laisser un commentaire.