DEV Community

Creating and Instantiating a simple class in python

Johnson Ogwuru on November 29, 2017

Last month i started taking a course on python and i stumbled on a tutorial on object oriented programming from the python perspective, and through...
Collapse
 
val_baca profile image
Valentin Baca • Edited

Nice. Some constructive criticism:

Try using the markdown blocks for code:

code = awesome
Enter fullscreen mode Exit fullscreen mode

Makes for a more readable page and saves you time (copy and paste code instead of taking and uploading screenshots) and allows readers to copy code directly.

Collapse
 
ogwurujohnson profile image
Johnson Ogwuru

Thanks alot, I'm new here. I actually appreciate the help, would start using that.

Collapse
 
sagaryadav profile image
sagaryadav

I think your way of explaining is amazing. I was confusing while going through the code somewhere else to understand the same concept. You explained it in such a simple manner that I could understand it.

Collapse
 
ogwurujohnson profile image
Johnson Ogwuru

I'm happy you enjoyed it, thanks for the kind words

Collapse
 
sagaryadav profile image
sagaryadav

Kindly update this image. res.cloudinary.com/practicaldev/im...

There appears to be a typo.
emp_1 repeated instead of emp_2

Collapse
 
ogwurujohnson profile image
Johnson Ogwuru

Sure would do.. Thanks

Collapse
 
eissah_nassir profile image
Ei-ssah

am writing a simple program where i want the userInput to be the instance of my class but i have failed to do so for example

name = input("Enter your name")

name = SomeClass(name)

so i can be able to perform some methods on it

Collapse
 
linomanzz profile image
linoman-zz

plz do more of the great tutorials - they rock !!!!

Collapse
 
cheikhoudiallo15 profile image
cheikhoudiallo15

I needed it this simple for it to make sense lol thanks