Day 1: Python Object and Data Structure Basics

Day 1: Python Object and Data Structure Basics

Pretty basic intro into Python.

ยท

3 min read

I wanted to give a quick run down on how I'll be splitting up my daily blog

In the first portion, I'll review what I learned from the '2022 Complete Python Bootcamp" course. I'll mainly touch base on the core concepts of the section and what I learned (or struggled to learn). The second portion of the blog will be dedicated to the project I completed in the sections of the "100 Days of Code: Python" course. This read should be short, considering it's just covering the basics.

Numbers, Variables, and Strings

The first couple of lessons should not come as a surprise to anyone privy to development in any language. I could pick these concepts up easily because the syntax is very strait-forward and was easily adaptable from knowing primitive types in JS. What I noticed was different off the bat was print() vs. console.log(). They pretty much produce the same result but just typed differently. Another difference between JS and Python was the naming convention for Objects and Arrays. In Python, they are called Dictionaries/Lists and Sets, respectively. If I'm missing any other key differences that would be good to note, let me know in the comments! Most of everything else functions the same way in terms of strings and assigning variables. In the lesson, they touch base on Booleans and File I/O, but since the 100 Days of code project for Day 1 only covers String and Variables, I'll save my learnings on that for another day (most likely tomorrow ๐Ÿ˜„).

100 Days of Code Project: Day 1 - Band Name Generator

Alright, so this project was pretty simple. It's basically just print() statements and input() statements with variables. The objective was to ask a couple of questions and have the result concatenate the two answers in a print call. The code I did to complete this is below:

print("Welcome to the band name generator")
input("Which City Did You Grow Up In?")
city = input("Which City Did You Grow Up In?\n")
pet = input("What Is Your Pet's Name?\n")
print("your band name could be " + city + " " + pet)

I will say if I were to do this in JS, there would be a bit more syntax needed. Other than that, I think Day 1's project was pretty straightforward.

EOD

That about wraps it up for Day 1. If anyone has taken these courses in Udemy and has notes, let me know! Also, if anyone wants to just chime in, please do as I am open to any helpful corrections, tips, and lessons ๐Ÿ˜.

Did you find this article valuable?

Support Kyle Leonard by becoming a sponsor. Any amount is appreciated!

ย