Mayungo Mayu Mayu
This time, as it is the second episode, we will put out characters from variables.
If you are new to this page Please also see Episode 1.
Also, the same content as this page is also published in the video, so if you prefer the video, please take a look.
Last time, I tried to put out the words of animation with print ().
print("Exactly DEATH ☆ GAME! !!")
Exactly DEATH ☆ GAME! !!
print("Monster card! !! !!")
Monster card! !! !!
You need "" "and"'' "in print ().
Only those inside "" "" and "''" are displayed.
However, if the same word appears many times here and there, writing it one by one will make the code longer and harder to read.
print("Monster card! !! !!")
print("Monster card! !! !!")
print("Monster card! !! !!")
print("Monster card! !! !!")
print("Monster card! !! !!")
Monster card! !! !!
Monster card! !! !!
Monster card! !! !!
Monster card! !! !!
Monster card! !! !!
So we use "variables".
Put the "monster card" in the box named card and the "death game" in the box named message.
Let's print the card and message immediately.
card = "Monster card! !! !!"
message = "Exactly DEATH ☆ GAME! !!"
print(card)
print(message)
At this time, only the name of the variable is put in ().
The reason why "" "" and "''" are not entered here is that the name of the variable itself will appear as characters if used.
Monster card! !! !!
Exactly DEATH ☆ GAME! !!
It came out without writing words one by one.
If you do not make a mistake in the variable name, the same thing will be displayed even if you change the place or order.
print(message)
print(card)
Exactly DEATH ☆ GAME! !!
Monster card! !! !!
Finally, put the request in a variable called onegai and display it.
onegai = "Thank you for subscribing to the channel"
print(onegai)
Thank you for subscribing to the channel
Thank you again for this time.