LordKelechi / Day-1-on-Replit-100

My first day learning how to code using Python.
0 stars 0 forks source link

Day 4 #4

Open LordKelechi opened 7 months ago

LordKelechi commented 7 months ago

print("===Your Adventure Simulator=== ") print("""You'll be asked a bunch of questions then we'll make you up an amazing story with YOU as the star!🤩 """) print() name = input("Your name: ") enemy = input("Your worst enemy's name: ") superPower = input("Your super power: ") print() print("Our story begins as our hero name approaches a foreboding castle...") print("Suddenly a bolt of ligthning striked the ground at the feet of", name) print("\033[0;31m'Our final battle begins!\033[0;0m'shouts the evil" , enemy, "clearly missing the fact that", name, "has the power of" "\033[0;32m" ,superPower , "\033[0;0m""which means they'll win quite easily")

To color texts within a double quote just type the color code you want before then the color code of the default afterwards. But in the case of a variable you have to place the color code within double quotes before and after the concatenation signs.