Python Tutorial 19: Python Classes and Methods Homework Examples

preview_player
Показать описание
You guys can help me out over at Patreon, and that will help me keep my gear updated, and help me keep this quality content coming:

In this video we show step-by-step instructions on how to understand and use Python Classes and Methods. We write demonstration code and give examples and solutions. We present solution programs to the homework in Lesson 18 I do not assume you are an expert, so these lessons are designed for complete beginners.
#Python
#Lessons
#Programming
Рекомендации по теме
Комментарии
Автор

You are really a very good teacher, I learned a lot from you sir. I want to learn much more from you. Please teach us all from your full of wisdom. Thank you.

pralaymajumdar
Автор

I was able to do it! I even coded it so that the students were in a loop 0 to numStudents so I didn't have to make up instances like stud1, stud2. I just worked inside the loop with std[i]=student. I thought that's what you were asking for in the assignment. It has a method to calculate average grade, low grade and high grade for each student. It has a method to use nested loops to print out the entire list of std[i] with each one's grades (scores[j]). I'm thinking of adding a method to find/print a single student name provided by the user. Anyway, it works like a champ.

bassman
Автор

Legend. It was definitely the lengthiest assignment so far, but by golly, it works!

Wythaneye
Автор

I was able to do it all on my own! I didn't even google for help!! Thank you so much Paul for your excellent lessons and of course I AM LEGEND!!

bharathr
Автор

Sir you are a great teacher. I learned very good arduino with help of your videos! Please don't stop teaching online. World needs teachers like you

aviralsoni
Автор

I absolutely love these lessons. They have given me confidence and have really helped me understand how many useful systems in today’s society work. Thank you Paul for all of these amazing lessons. I wish you many more years of health and happiness.

chrisb
Автор

Thought to much about how to loop through and asking for the student names and grades in one setting, instead of just passing the first and last name to the class. After couple of hours I realized that I had the solution already figured out. Immersing yourself into the topics...even when it takes me hours to figure it out...does help to gain a better understanding. Thank you for keeping us motivated to become legends!

zoltantakacs
Автор

"I am legend!". I finally got this right after folding up 4 months ago due to a silly error. I tried again. I love these classes about classes. They came difficult to me too, but I guess I am slowly getting this. YAY!
Sometimes it helps to give something a break.

EFoxVN
Автор

It took me a while to wrap my head around everything. But once I did it flowed really fast and made a ton of sense! I AM LEGEND!

NOS
Автор

mr paul i have learned python before i know you but i watch your videos because i have fun and i gain experience from you in programming

abdalrhmanelnhaas
Автор

I struggled with the homework this time round but in the end I managed to come up with a solution. I need to tweak some things now that I have seen your solution. For example I didn’t know that I could put the high grade and the low grade the way you did it. Instead I placed two lines of code, one saying highGrade = highLow[0] and another saying lowGrade=highLow[1]. I also went a bit beyond by creating a pickle to place the students names in a file rather than placing them in the code. Don’t know if I can call myself legend this time round but I feel that I’m learning a lot and grasping all concepts thanks to your excellent tutorials. Thanks a lot.

ecassar
Автор

I am a legendary fold-up chair. I was struggling to visualize how the user was supposed to interact with the data, so I watched Mr. McWhorter start the program. I then did the bulk of the code on my own, but checked my work with the video as I went.
Looking forward to graphics and AI!

jonathanlanders
Автор

Legend, great video, struggled with concept for classes and methods.

lewismeyer
Автор

I'm learning arduino with you today 😂 u're really the best teacher ❤

husseinhamze
Автор

I am legend--maybe. I was a little confused on what exactly you wanted in this assignment but I did get my implementation working as expected. It seemed like there should be some way for me to iterate through the Student objects but I didn't know how. Looking forward to seeing your solution, then I'll go back and do it again.

never_code
Автор

I am legend. Took quite a while. Got hung up with returning multiple variables in the highLow grades. Finally figured out I needed to separate the high and low in the main program. Thanks for the great lessons. I'm learning alot. Already been through your arduino lessons. Just got my gear for the raspberry pi lessons and I have the kit for the raspberry pi pico w you will be doing this coming year. Looking forward to that one.

Tom

tntragan
Автор

This was a lot of fun, I was very close to your solution with the biggest change being how I printed out the grades as an array instead of printing each individually - I guess I did not quite understand what you were looking for. All in all, I am very pleased!

pokerface
Автор

Sir good morning, thank you very much that i am the one your followers for your vlog sir. It can help me for my carrier now as a contractor. Infact im beginers for arduino programing sir, but in plc, hmi and motor control i know cause that is my pevious work since i was working for industrial company. Thank you very much sir, you are good teacher or facilitator because you have and full methodology of teaching that easily get by the viewers.

fjrdavinautomationabregana
Автор

Finally, have the lesson done and set in my head. Thanks, Paul.

opalprestonshirley
Автор

Started out great writing the first method and then struggled as I tried to add conditionals inside the () of the following methods. It worked but it was messy.

Watched your explanation and when you created self.ng and self.grades I had an AH HA!! moment. It made sense to use these variable inside the other methods. Stopped the lesson, went back to my code and breezed through it.

Lesson learned!! I AM LEGEND! Thank you!

TheScissorunner
visit shbcf.ru