Posts

Coding Lesson (27-31 January)

MONDAY Continue learning Python on Kaggle. Changing Lists Lists are "mutable". You can modify your lists "in place". For example, I want to change the name of the locker owner.  Well, Lkhagvasuren is a really hard name to type (I don't know why I choose that name at the first place). So, I'm going to change it. lockers[6] = 'Amogus' lockers ['Emily', 'John', 'Adam', 'Alicia', 'Eve', 'Zack', 'Amogus'] That's easier to read. We also can change two and more. Not just one. For example: lockers[:3] = ['Aidan', 'Raito', 'Yelena'] print(lockers) ['Aidan', 'Raito', 'Yelena', 'Alicia', 'Eve', 'Zack', 'Amogus'] List functions Python has several useful functions for working with lists, like len , sorted , sum , min and max .  Example for 'len': len(lockers) # Output: 7 Example for 'sorted': sorted(lockers) #...

Coding Lesson (20-24 January)

Image
Monday Continue on Grade Calculator Project. Today I will learn how to receive input in Python.  I tried making the code into an HTML but for unknown reason it's bugged. The line that should be inside the code appeared at the web browser. I tried so many things that can help me to get done the things with help of Copilot but unfortunately it doesn't work. Here's the picture of what happening: The calculate button also doesn't work. How unfortunate. Tuesday Continue learning to receive input in Python. Today, I will use another way. Instead of making it into an html, we're going to try using command prompt. Here's the code with the explanations: # Function to calculate the average of the grades def calculate_average(grades):     return sum(grades) / len(grades) # Function to determine the letter grade based on the average def determine_letter_grade(average):     if 90 <= average <= 100:  # A grade         return 'A'     el...

Coding Lesson (13-17 January)

Monday I learned about Getting Help  in Kaggle. The help() function is incredibly useful. It gives you detailed information about how to use a function and what it does. For example: help(print) shows you that print() can take several optional arguments like sep (which controls what gets printed between multiple values) and end  (which controls what gets printed at the end of the line). Also, there's a  COMMON MISTAKES TO AVOID:  Make sure you pass the function name itself to help() , not the result of calling the function. Tuesday I continue learning about Getting Help—defining functions—in Kaggle. Here's a simple function example: def say_hello():     print("Hello.") def is the keyword that tells Python you are defining a function and  say_hello  is the name of the function. So, when you call say_hello it will print "Hello.". But, how about functions that take inputs? Here's the example: def least_difference(a, b, c):     diff1 = abs...

Beasiswa New Zealand (18-22 Nov)

Monday Searching more about CIMB ASEAN Scholarship. I tried searching about test that probably will be on the scholarships. This is what I got from Kobi Education: "akan mengikuti berbagai tes dan kegiatan yang menilai kemampuan komunikasi, kepemimpinan, dan pemecahan masalah".  I also tried searching for another scholarship, but I found nothing. Tuesday Yesterday, I searched about CIMB ASEAN Scholarship and today I tried searching more information about Beasiswa Indonesia Bangkit, because I don't know what I should find about CIMB ASEAN Scholarship. So, I found some information like document and regulations for  Beasiswa Indonesia Bangkit. Here's the link:  Beasiswa Prestasi S1 Luar Negeri (BP.02) – Beasiswa Indonesia Bangkit (BIB) Wednesday Today, I searched about Beasiswa Indonesia Maju. I tried searching about the regulations. Here's the link that I found:  FAQ | Beasiswa Indonesia Maju . After reading the regulations I think it's hard for me to get the sc...

Coding Lesson (18-22 Nov)

Monday Last time I already learned about Indexing and Slicing. Today, I learned on Kaggle about Removing Items and Adding Items in Lists. Removing Items To remove items on the list, you only need to use  .remove() For example: flowers_list.remove("hard-leaved pocket orchid") print(flowers_list) pink primrose,canterbury bells,sweet pea,english marigold,tiger lily,moon orchid,bird of paradise,monkshood,globe thistle Adding Items To add items on the list, you will need to use .append() For example: flowers_list.append("dandelion") print(flowers_list) pink primrose,hard-leaved pocket orchid,canterbury bells,sweet pea,english marigold,tiger lily,moon orchid,bird of paradise,monkshood,globe thistle,dandelion Tuesday Continue learning on Kaggle. I learned about "Lists are not just for strings". Lists can have items with any data type, including booleans, integers, and floats. Here's an example: hardcover_sales = [139, 128, 172, 139, 191, 168, 170] print(...

Coding Lesson (11-15 Nov)

 Monday I learned on how to use git to run programs for my Python project. Here's the video:  https://youtu.be/v_1iqtOnUMg?si=8mSsfm692Q5ADkqS Tuesday I tried some code for the project. Unfortunately, when I run the program, it said that I have the wrong syntax. Here's the code: # List of grades grades = [95, 85, 75, 65] # Function to calculate average def calculate_average(grades):     return sum(grades) / len(grades) # Function to determine letter grade def determine_letter_grade(average):     if 90 <= average <= 100:         return 'A'     elif 80 <= average < 90:         return 'B'     elif 70 <= average < 80:         return 'C'     elif 60 <= average < 70:         return 'D'     else:         return 'F' # Calculate average and determine the letter grade average = calculate_average(grades) le...

Coding Lesson (4-8 Nov)

 Monday - Tuesday Continue studying on Kaggle. I learned about lists in Python. Lists helps you organize, for example you want to make a lists of flower species. To organize, you should use Python string.  For example: flowers = "pink primrose,hard-leaved pocket orchid,canterbury bells,sweet pea,english marigold,tiger lily,moon orchid,bird of paradise,monkshood,globe thistle" print(type(flowers)) print(flowers) <class 'str'> pink primrose,hard-leaved pocket orchid,canterbury bells,sweet pea,english marigold,tiger lily,moon orchid,bird of paradise,monkshood,globe thistle To make it easier to read, you can use square brackets ([]) and add comma.  flowers_list = ["pink primrose", "hard-leaved pocket orchid", "canterbury bells", "sweet pea", "english marigold", "tiger lily", "moon orchid", "bird of paradise", "monkshood", "globe thistle"] print(type(flowers_list)) pri...