#100DaysOfCode: Python Day 1

#100DaysOfCode: Python Day 1

print(), input(), len()

Β·

3 min read

#100DaysOfCode Day 1

Welcome aboard to my learning journey! πŸš€

Yesterday, I started my journey to learn Python while doing a challenge that I always wanted to do... #100DaysOfCode!

Did I bite off more than I can chew?
Ehhmmm.... MAYBE!!!

This is my start...

I found this cool course on Udemy. You should check it out as it is directly linked to the #100DaysOfCode Challenge!
I thought this is awesome, two birds with one stone...
Thanks, Dr. Angela Yu, for creating it!

Wait, rewind...
Why do I want to learn Python?
I guess I always wanted to learn a second major language. C# is great and all but Python seems to fit in use cases where C# does not seem ideal...
Yes, I can hear you screaming, saying C# and .net can do everything, but it's just better to use something lightweight and more fit for purpose in some cases.
Not to mention thats it's nice to get away from "just coding" and being a noob again!

My goal at the end of all of this is to be able to do some real-time image recognition and automate fishing in Minecraft!
Sounds simple after you watch this where someone wrote a script to find diamonds in Minecraft. GENIUS!!!

Anyways that's my short term goal, and long term goal is to train a machine to perform document classification. I heard it's good for that too if you know a bit about Machine LearningπŸ˜‚.

Lessons

Enough rambling for now; this is what I learned...

  1. Do not skip the tutorials and just try the Labs and Quizzes!
  2. The instructor said to use this site as an IDE for now... Listen to her, don't install and set up Visual Studio Code ahead of day 15 as she specified on day 1!
  3. (Personal Opinion) Python is easier to learn than C#... at least the basics. I see why schools teach Python instead of VB, Java or C#.

TO THE CODE!!!

printing.py - at least I did not show you Hello World to be typical 🀣

print("Hello " + "Rishal")
print("Hello" + " Rishal")
print("Hello" + " " + "Rishal")

inputs.py - len() is a function used to get a length of a string.

print('Hello ' + input("What is your name? ") + "!")
print("")

Let's try something more challenging...

print(len(input("What is your name? ")))

Output:
6

inputs.py - Hey, I can now write some user-driven code!!! πŸ₯³

name = input("What is your name? ")
length = len(name)
print(length)

P.S. I would love to share the course's repos with you, but I think that would be a disservice to the amazing instructor. The courses on Udemy are really affordable, and if you want to learn Python like me, buy the course and share your learnings with the world too 😁.