mercredi 3 juin 2020

Problem with output of simple if-statement

Right now this is my code:

test_score = 500

if important_aspect == "\x7fVrijheid: Ik wil mijn eigen acties en keuzes maken. Ik wil autonomie hebben.', ' \x7fUitdaging: Ik wil mij competitief en effectief voelen.', ' \x7fVerbinden: Ik wil mij verbinden met anderen. Multiplayer games zijn daarom belangrijk.":
    test_score = test_score + 100

print (test_score)

The output gives 500, which means nothing happend. The output should be 600, because the variable important_aspect contains the following information:

important_aspect = \x7fVrijheid: Ik wil mijn eigen acties en keuzes maken. Ik wil autonomie hebben.', ' \x7fUitdaging: Ik wil mij competitief en effectief voelen.', ' \x7fVerbinden: Ik wil mij verbinden met anderen. Multiplayer games zijn daarom belangrijk.

How can I make sure the python reads the important_aspects data equal as the data in the if-statement, so the output will be 600?

Aucun commentaire:

Enregistrer un commentaire