Hi!
In an attempt to teach some programming to my boys, I wrote this simple program. It's a light hearted and fun "psychological" animal test you can run/play with your friends and relatives.
If you want to test it just copy-paste the following code into a text file animaltest.py
, and run it with python3.
If you don't have python3 installed on your computer, you can also test this one at Python Online by copypasting it there, checking the switch for "interactive", and pressing "execute".
(I originally directed you guys to JDoodle, but it seems the site has problems with Android OS. Let's see if Python Online is better, yes?)
# we need a small pause between the questions and the answers, so we'll import time functions
import time
# define the animals as variables
animal1 = input("Tell me the first animal that comes to your mind: ")
animal2 = input("Tell me the second animal that comes to your mind: ")
animal3 = input("Tell me the third animal that comes to your mind: ")
# define the animal descriptions as variables
description1 = input(f"Describe {animal1}: ")
description2 = input(f"Describe {animal2}: ")
description3 = input(f"Describe {animal3}: ")
# linefeed:
print("\n")
# define the answers as variables
imagine = f"You imagine others thinking you are like {animal1};\n\t {description1}"
actually = f"Others actually think you are like {animal2};\n\t {description2}"
reality = f"But in reality, you are like {animal3};\n\t {description3}"
# pause between answers, and print the answers collected in the previous variables:
time.sleep(3)
print(imagine)
time.sleep(4)
print(actually)
time.sleep(5)
print(reality)
Running the code
Tell me if you like it. 😊