dimanche 27 décembre 2020

Python Variable Understanding

I was writing this code and I can't seem to get it to work correctly. There's no Syntax errors so I'm clear on that. It just is not giving me the correct output I want.

Here's the code :

CLICK HERE FOR THE CODE IMAGE

This is the out put I get when x = 5 : Big! Done!

This is the output I get when x = 1 Small! Done!

This is what I get when x = anything other than 1 or 5 Done!

What I want it to do is when x = anything between 1-5 to output Small! then Done! Or if it is between 5-infinity to output Big! then Done! but if the number is not 1 or 5 it just outputs Done! What changes should I do to my code?

Aucun commentaire:

Enregistrer un commentaire