dimanche 22 mars 2020

In python, my stament is printing twice after I answer it once

In my text-adventure game, when I have Would You like To Play (yes/no)yes Ah! You are being chased by something! You need to go fast! Should you take the bike or the skateboard (bike/skateboard)skateboard Ah! You are being chased by something! You need to go fast! Should you take the bike or the skateboard (bike/skateboard) This means when I choose skateboard once, the question repeats, but if I chose bike, it goes on normally. This is the code:

if chooseAnswer()=='yes':
    if chooseAnswer1`enter code here`()=='bike':
        if chooseAnswer11()=='right':
            if chooseAnswer111()=='TBD':
                print('TBD')
            elif chooseAnswer112()=='TBD':
                print('TBD')
        elif chooseAnswer11=='left':
            if chooseAnswer121()=='TBD':
                print('TBD')
            elif chooseAnswer122()=='TBD':
                print('TBD')
    elif chooseAnswer1()=='skateboard':
        if chooseAnswer12()=='awake':

an anyone see why the statemnt is repeating twice? Do you need me to have the functions

Aucun commentaire:

Enregistrer un commentaire