~In today's post, we're going on a coding adventure together! First, I'll update you on some exciting changes and share what's coming next on my channel (Part 1). Then, we'll dive into a comprehensive Python basics recap, revisiting key concepts from our last course! (Part 2) ~Meoww! Whether you're catching up or reviewing, there's something for every code adventurer here! ~Let’s get started! ✨/ᐠ > ˕ <マ✨
~Meowww, my dear code adventurers! Mia here! 💌✨(˶^ ᵕ ^˶)💖
~I wanted to give you a little purr-fect update about the summer roadmap! Originally, I had planned to release several videos from July to September...but life threw me a few unexpected challenges. Even if I enjoyed my holidays, this summer was a bit more challenging than expected with personal problems...~But don’t worry, I’m back on track now!
Because of this, I’ve decided to stop making roadmaps for future videos. However, I’ll still announce the next video topic each month, though! While I adore planning for you all, I realized that life is unpredictable...like a cat chasing a laser pointer! I don’t want to set expectations that I might not be able to meet.
I also initially thought about doing shorter videos for summer (around 10 minutes), but then I decided to cover everything in depth for extra clarity...~even if it takes a little more time!
~Thank you sooooo much for your understanding, patience, and continued support, meoww! ~I’m super excited to bring you more adventures and keep improving with each one! 💗(=^・^=)✨
~Speaking of adventures...~the next video on the Multipage Inventory System is coming out soon this month, but until then, let's take a paws and revisit our previous quest on Learning Python!~ Whether you're new to coding or just brushing up on the basics, this purr-fect recap guide is just for you! 💻✨ /ᐠ > ˕ <マ💓
~In our last adventure, we explored all the meowww fundamentals from the video "Master Python and Ren'Py Basics"! ~Don’t hesitate to check out the full video for more details: 🎞️✨(˶^ ᵕ ^˶)💖
~Sooo let's see the summary here step by step! 📝✨/ᐠ - ˕ •マ✨💙
~Integers are whole numbers without any decimal points! ~Like how many fishies I've caught today! Examples include 25, 100, and 3. These are all integers in Python, perfect for counting and calculations!
~But watch out! If you put quotation marks around a number, like '3', it turns into a string! ~And 'Meow!' is definitely a string too! Strings are sequences of characters...~like words and sentences we use to express ourselves! 📖(=^・^=)✨
In Python:
~Remember, in Python, a number enclosed in quotation marks becomes a string! ~Soooo...if you want to do math with numbers, make sure they're not inside quotes! 🧮(=^・^=)💕
~Floats are numbers with decimal points! ~Like the precise amount of milk in my bowl! Examples include 3.14, 0.01, and -2.5. These are all floats in Python, perfect for measurements and calculations that need a little more detail!
~But watch out (~again meoww)! If you put quotation marks around a number with a decimal point, like '3.14', it turns into a string! And 3 without any decimal point is actually an integer, not a float! ~Soooo.....meowww, it's important to know the difference!
In Python: 🧋(=^・^=)✨
~Remember, in Python, numbers with decimal points are floats! ~So if you're working with decimals, make sure to include that little dot! 📻
~Strings are like the words and sentences we use every day! ~Perfect for expressing ourselves! In Python, strings are sequences of characters enclosed in quotes. Examples include 'Hello', "Python", and even "123" (which is a string of characters, not a number).
~But watch out! (What? Meowww? Again???) ~If you write 123 without quotes, Python thinks it's an integer, not a string! And True without quotes is a special value called a boolean. ~Soooo....~to create strings, always use quotes! 🗒️(=^・^=) ✨
In Python:
~Remember, always use quotes for text to create strings in Python! That way, you can store and play with text data easily! 📔
~Booleans are like simple yes or no values! ~Perfect for making decisions in your code! In Python, booleans are True or False, written without quotes.
~But watch out! (Uh....hehe, yes...~again!) ~If you put quotation marks around 'True', it turns into a string, not a boolean! ~And numbers like 1.50 or 3 are not booleans! ~They're floats and integers! ❤️(=^・^=) ✨
In Python:
~Remember, in Python, booleans are True or False without quotes! ~They're super handy for controlling the flow of your programs! 💤
~Variables are like magical treasure chests where we can store our precious data!
Example 🗃️✨/ᐠ > ˕ <マ✨💗
Age stores the integer 25.
Name stores the string 'Mia'.
# Integers (int): Whole numbers without a decimal point. For example: Age = 25
# Strings (str): A sequence of characters (text). For example: Name = 'Mia'
~Variables help you store and reuse values easily! They make your coding adventure organized and fun! 🗝️
if-else
Statements 🔦~In coding, sometimes we need to make choices! ~Just like deciding whether to take a catnap or chase a laser pointer!
Example: 📝✨/ᐠ - ˕ •マ✨🕯️
# Integers (int): Whole numbers without a decimal point. For example: age = 25
# ~First, let's use an if-else statement to check if someone is an adult if age > 18: print("You are an adult.") # ~Meow! Since age is 25, this will be printed else: print("You are a minor.") # ~This will not be printed because age is greater than 18
Explanation: 🔍
~In Python, indentation is super important! Always use a tab or 4 spaces to indent the code inside each if, elif, else block. 📝
if-elif-else
Statements 🧭~Sometimes we have multiple paths to choose from! ~Just like deciding between playing with yarn, chasing butterflies, or taking a catnap!
Example: 📝(=^・^=) ✨⚙️
# Integers (int): Whole numbers without a decimal point. For example: age = 25 # ~Here, age is an integer variable holding the value 25.
# ~Let's add more conditions using if-elif-else to categorize age groups if age < 13: print("You are a child.") # ~This will not be printed because age is 25 elif age < 18: print("You are a teenager.") # ~This will not be printed because age is 25 else: print("You are an adult.") # ~This will be printed because age is 25 and doesn't meet the other conditions
Explanation: 🔍
~Order your conditions from most specific to most general to ensure correct execution! 🧸✨
~For Loops allow us to repeat a block of code multiple times.
Example: 📝(=^・^=) ✨⚙️
# ~Now, let's use a for loop to print numbers from 0 to 4 for i in range(5): print(i) # ~Meow! This will print numbers 0, 1, 2, 3, 4
Output: 📜
0 1 2 3 4
~The range(n) function in a for loop goes from 0 up to n-1, not including n! 🍪🍪🍪🍪🍪
~While Loops allow us to repeat a block of code as long as a condition is true.
Example: 📝✨/ᐠ - ˕ •マ💖
# ~Let's use a while loop to do the same thing count = 0
while count < 5: print(count) # ~This will print the current value of count count += 1 # ~Meow! Increment count by 1 each time the loop runs, until it reaches 5
Output: 📜
0 1 2 3 4
~Ensure the condition will eventually be false to avoid infinite loops! ⛓️💥
~Let's embark on an exciting adventure to create our very own Visual Novel with Ren'Py!
Complete Code: ✒️
# ~First, we define a character. ~Meoww let's say it's me! define m = Character("Mia")
# ~Next, we set a default age. # ~Let's add my age here. Feel free to adapt your own value. default age = 22
label start:
# ~Meowww! ~Let's use an if-else statement to check if I'm an adult! if age > 18: m "You are an adult." # ~Meow! Since my age is 22, this will be displayed. else: m "You are a minor." # ~Not be displayed because age is greater than 18.
# ~Let's set counters to track the number of choices made. $ counter = 0 $ left_choices = 0 $ right_choices = 0
# ~Now, we'll use a while loop to give the player 2 choices. while counter < 2: menu: "Go left": m "You chose left." # ~If the player chooses to go left. $ left_choices += 1 # ~Increase the left choice counter. "Go right": m "You chose right." # ~If the player chooses to go right. $ right_choices += 1 # ~Increase the right choice counter.
# ~Meow! Increase the counter by 1 each time a choice is made. $ counter += 1
# ~Bonus: Determine the majority choice # ~Once the player has made 2 choices, we'll determine the majority choice
if left_choices > right_choices: m "~Meowww! You chose left the most with [left_choices] choices!" elif right_choices > left_choices: m "~Meowww! You chose right the most with [right_choices] choices!" else: m "~Meowww! It's a tie! You chose left and right equally."
m "~Meowww! End of the game. You made 2 choices." # ~Final ~meoww message return
# ~Great job! You've learned conditions, loops, and menus! # ~Keep practicing and exploring! # ~Meow! ~Love you and have a blessed day!
~Feel free to customize and expand upon this code! Let your creativity shine and make the story your own! ~Stay Tuned! The next video on the Multipage Inventory System is coming very soon. ~Meowww! ~Please, don't forget to subscribe for free on my YouTube channel "Discover with Mia" and hit the notification bell ~soooo you won't miss it! ~Thank you for your support and your trust! 💌/ᐠ > ˕ <マ💞
~Let’s continue this meowwwwgical coding journey together and get ready for our next exciting adventure!
~Have a blessed day and love you! 🍀🌟/ᐠ˵> ﻌ<˵マ🌸💓
Did you like this post? Tell us
Leave a comment
Log in with your itch.io account to leave a comment.
~Meoww? 💌✨/ᐠ - ˕ •マ🔔💗 ~What did you think? Did you enjoy this post? ~Let me know in the comments! If this helped you on your coding quest, ~I might prepare more tips and lessons like this, alongside the videos! ~Have a blessed day, and love you! 🍀💖/ᐠ˵> ﻌ<˵マ🌸🌟