Getters and Setters in Python | Python Tutorial - Day #60

  Рет қаралды 196,423

CodeWithHarry

CodeWithHarry

Күн бұрын

Пікірлер: 368
@dawood3578
@dawood3578 5 ай бұрын
Those who didn't understand, please don't comment and read this once: In Python, getters and setters are used to control the access and modification of class attributes. They are commonly used to enforce data encapsulation and validate the input before allowing changes to the attribute. Here is a simple example to demonstrate the concept of getters and setters in Python: class Person: def __init__(self, name, age): self._name = name self._age = age # Getter method for getting the name attribute def get_name(self): return self._name # Setter method for setting the name attribute def set_name(self, name): self._name = name # Getter method for getting the age attribute def get_age(self): return self._age # Setter method for setting the age attribute def set_age(self, age): if age > 0: self._age = age else: print("Age must be a positive number.") # Creating an instance of the Person class person = Person("Alice", 30) # Using the getter method to get the name attribute print(person.get_name()) # Output: Alice # Using the setter method to set the name attribute person.set_name("Bob") print(person.get_name()) # Output: Bob # Using the setter method to set the age attribute with an invalid value (negative number) person.set_age(-5) # Output: Age must be a positive number. # Using the setter method to set the age attribute with a valid value person.set_age(35) print(person.get_age()) # Output: 35 In this example, the Person class has getter and setter methods for the name and age attributes. The getter methods allow us to retrieve the values of the attributes, while the setter methods allow us to modify the values with some validation logic. By using getters and setters, we can ensure that the class attributes are accessed and modified in a controlled way, which helps in maintaining the integrity of the data within the class.
@ibrahimparkar6900
@ibrahimparkar6900 5 ай бұрын
thank man now I understand.
@dawood3578
@dawood3578 5 ай бұрын
@@ibrahimparkar6900 no problem. Take help of Ai wherever you get stuck.
@rajdeepsingh8363
@rajdeepsingh8363 5 ай бұрын
But bro we can also access the value without using getters then why we used getters.plz reply??
@ibrahimparkar6900
@ibrahimparkar6900 5 ай бұрын
@@rajdeepsingh8363 read the last para
@shivaniputtoju3133
@shivaniputtoju3133 4 ай бұрын
you made it simple thanks
@arpanadhikari6881
@arpanadhikari6881 Жыл бұрын
My experience for Getters and Setters is 2/10. You made the topic a bit tough. you explained like this is a revision class for getter and setter. I am very my delighted with this 100 days coding challenge. I give it a solid 9/10 for the python playlist. But in this topic you were a bit inconsistent.
@harshitha.m.4189
@harshitha.m.4189 Жыл бұрын
yes i agree he didn't make this topic well enough for beginners to understand
@anupkanu7659
@anupkanu7659 Жыл бұрын
totally agree man.
@neverlost7195
@neverlost7195 Жыл бұрын
yeah you are right. Kinda looked like he was in a hurry.
@musicaljoker1115
@musicaljoker1115 Жыл бұрын
same with decorator
@uttambarve9425
@uttambarve9425 Жыл бұрын
agreed
@nihanshupethe8983
@nihanshupethe8983 Жыл бұрын
This topic was so easy but you made it little bit tough. If you don't use 10 it would be much easier.
@officialdreamplayz
@officialdreamplayz Жыл бұрын
hlp me how setter getter
@VarshaSorout-vj9is
@VarshaSorout-vj9is Жыл бұрын
poklaaaaaaa@mayankjoshi3985
@SaiManognyaDesetty-bs3gp
@SaiManognyaDesetty-bs3gp Жыл бұрын
All the videos until now have been amazing! In this video I did not get a clear idea of the functioning of getters and setters, and why these are actually required. Can anyone please elaborate?
@animeforever8508
@animeforever8508 10 ай бұрын
In object-oriented programming, Getter and Setter methods are used to access and modify the private variables of a class, respectively.
@GauravPathak-u8m
@GauravPathak-u8m 9 ай бұрын
Setter is used to set value for a variable and getter for getting the value suppose you are writing a bank application and you want a method which will set the balance for a customer after few validation only like he will put some pin or password only then his amount should be set to entered value so in this case you can make use of setter method where you can write your validation logics before setting value of amount. Similaraly in case of getter suppose a customer need info of amount available in his account you can write some validation before giving him details to verify if it’s a correct customer. Hope this helps
@SaiManognyaDesetty-bs3gp
@SaiManognyaDesetty-bs3gp 9 ай бұрын
Thank you! ​@@GauravPathak-u8m
@Coherentsoul
@Coherentsoul Жыл бұрын
This is the first lesson that i didn't really understand. 😵
@mdadil1456
@mdadil1456 9 ай бұрын
han mje mushskil horahi hai.
@NeelRajora_
@NeelRajora_ 8 ай бұрын
In Object Oriented Programming, Getters and Setters help in rewriting Protected/Private Variables through the Class itself, because these Variables do not allow Rewrite unless you have access to the source code.
@tarsemlal1720
@tarsemlal1720 6 ай бұрын
Same bros it is a little difficult
@theroshantune
@theroshantune Жыл бұрын
incredible! i can't believe that we have completed 2 months in this golden journey wanted to see me after 1 month and 9 days!
@ek__villain
@ek__villain Жыл бұрын
I came here to watch this video within 2 weeks
@Random-Sad
@Random-Sad 6 ай бұрын
For those who were not able to understand Getters and Setters with this video because it is really not taught in a good way as _value was written and it was never told that it is to make it protected and etc. So, you should consider watching one from these two videos or both of these to understand this topic: Couldn't add links in comments so search term for videos: 1. Python OOP Tutorial 6: Property Decorators - Getters, Setters, and Deleters 2. Setters & Property Decorators | Python Tutorials For Absolute Beginners In Hindi #69
@sudhansubalasahoo
@sudhansubalasahoo Жыл бұрын
Present Sir You told us to tell the meaning of *args and **kwargs in dictionaries video but you haven't told us, so please explain
@indianheartbeat9005
@indianheartbeat9005 10 ай бұрын
*args and**kwarge is a syntax to pass all available arguments directly. I there are no arguments it will pass nothing but if it has 10 argument it will pass 10 in same order.. it makes things dynamic for scenarios like previous video
@arnabkundu1648
@arnabkundu1648 6 ай бұрын
It was taught in arguments of functions video(day 21)
@arpankarmakar16
@arpankarmakar16 Жыл бұрын
It's an incredible journey harry bhai. It's 2 months since you started this course and you never took a day off! Hats off! EDIT: 100 Days of Code is completed, trust me this has the ability to change your life!
@sparkcodez
@sparkcodez Жыл бұрын
bro i have seen you every time when i open comment section XD btw what class r you in?
@arpankarmakar16
@arpankarmakar16 Жыл бұрын
@@sparkcodez Because I comment in every video, to prove that I'm consistent. And I'm in 9th class 😅
@sparkcodez
@sparkcodez Жыл бұрын
@@arpankarmakar16 damn, i am in 7th(about to go in 8th) so ig Ur 14 years old?
@arpankarmakar16
@arpankarmakar16 Жыл бұрын
@@sparkcodez Yup
@arpankarmakar16
@arpankarmakar16 Жыл бұрын
@@sparkcodez When did you start learning to code?
@gamerofwolfstreet
@gamerofwolfstreet Жыл бұрын
watching this for 2nd time getters & setters.. thoda confusing but iss baar understand karke jaunga
@valorantaccount462
@valorantaccount462 Жыл бұрын
I believe in taking my time to fully comprehend and retain information, even if it requires multiple viewings. It is more important to understand thoroughly than to rush through and potentially forget. Slow and steady wins the race
@gamerofwolfstreet
@gamerofwolfstreet Жыл бұрын
@@valorantaccount462 Thank you bro
@palamu_tiger02
@palamu_tiger02 Жыл бұрын
Thank you Harry Bhai. I watch your DSA full playlist. I get good understanding in DSA.
@alshifabelim6190
@alshifabelim6190 Жыл бұрын
A setter updates the value of a variable, while a getter reads the value of a variable.
@sahalAshfaq
@sahalAshfaq 11 ай бұрын
I like this codeing course of python I see your html,css,python mr.haris ali khan
@patkabhi
@patkabhi Жыл бұрын
Great Harry Sir! I am very happy you are doing excellent job it will help every passionate Python programmer who seriously want to increase his knowledge and skills. Great work!! Hats off to your efforts
@hyperat936
@hyperat936 6 ай бұрын
I will do that review after the completing the course for now it is going smoothly and awesome.
@rohitjgamer5860
@rohitjgamer5860 8 ай бұрын
Thank you Harry bai to making this topic so easy to understand, the way of explaining is fantastic, hopping to get projects on python soon.
@CiscoSdwan-n9m
@CiscoSdwan-n9m Жыл бұрын
I watched your 60 videos from my both accounts, it was revision of all your 60 videos out of 100, really informative, my logic got cleared and i started creating little test cases and unit tests based of python netmiko and paramiko as well. if you have videos about the api and web control using python and selenium, pls share link of that.
@Abhishek-gf9fm
@Abhishek-gf9fm Жыл бұрын
Konsi clg mei ho
@Tech_Enthusiasts_Shubham
@Tech_Enthusiasts_Shubham Жыл бұрын
thanks for makinğ this course it is really helpful for me and your teaching method is really fabulous sir
@adarsh-sharma
@adarsh-sharma Жыл бұрын
As always, Amazing content Harry bhaiya. I wish this knowledge could be accessible in English for my abroad friends to understand.
@sudhansubalasahoo
@sudhansubalasahoo Жыл бұрын
Well, you can always give them the repls as they are written in english
@sawaijangid1435
@sawaijangid1435 Жыл бұрын
It's incredible Harry bhai 🔥🔥🔥
@susmitamainde6644
@susmitamainde6644 5 ай бұрын
Thank you sir for playlist it's really awesome no doubt.. but this is the first video i didn't really understand.
@a12gaming61
@a12gaming61 7 ай бұрын
so guys, for those of you who didnt understand setters and getters .They are a same function which is made to behave as a setter as well as a getter ,when we use "property " attribute it behaves like a getter and when we use "setter" attribute is behaves like a setter
@abhishekvishwakarma9045
@abhishekvishwakarma9045 Жыл бұрын
hi harry bhai, but here at 6:42 wanted to know whether this is encapsulation or abstraction (as abtraction is hiding the implmentation details of code and encapsulation is hiding the data visibility from the user by combining data with functions) so little confused here , thanks ;)
@cm-a-jivheshchoudhari9418
@cm-a-jivheshchoudhari9418 Жыл бұрын
encapsulation
@anonymous____________________4
@anonymous____________________4 Жыл бұрын
Pranam bhrata 🙏 apka bahutt baht dhanyawad 🙏❤️🙏
@DOAKASHU
@DOAKASHU 2 ай бұрын
Must to do videos As a experienced developer i am still learning want to become best coder in world! I Will make the History
@narendraparmar1631
@narendraparmar1631 11 ай бұрын
Very informative , Thanks Harry
@hasan_sagor111
@hasan_sagor111 5 ай бұрын
Very helpful❤
@Manish-qt1bz
@Manish-qt1bz Жыл бұрын
Present Sir 🔥
@sakshijagtap2458
@sakshijagtap2458 11 ай бұрын
😍😚course is going well
@Melody-Rishabh
@Melody-Rishabh Жыл бұрын
yup bro u are really genius kafi jayada hadd tk knowledge h aapko is filed ki 👍
@Mohd_Zaid_khan
@Mohd_Zaid_khan Жыл бұрын
Filed ki💀 Apni knowledge to badha le bro
@Melody-Rishabh
@Melody-Rishabh Жыл бұрын
meri filed different h bro business line h bro par me chahta computer line tha 😊.
@nipainsaini5414
@nipainsaini5414 10 ай бұрын
awesome course. thanks indeed
@meditationmusic6482
@meditationmusic6482 Жыл бұрын
Thanks sir.
@HuzaifaKhan-iy5qj
@HuzaifaKhan-iy5qj 5 ай бұрын
# Program to observe the getter and the setter properties class employe: def __init__(self, name, id): self._name = name self.id = id @property def name(self): #Getting the name return self._name @name.setter #setting the new name def name(self, newname): self._name = newname #Instance emp = employe("Fedrick", 23) print(emp.name, emp.id) emp.name = "Jimmy" print(emp.name)
@sukhdeepdeshmukh970
@sukhdeepdeshmukh970 4 ай бұрын
thanks Buddy....;)🫂🫂
@kanikaarora606
@kanikaarora606 Жыл бұрын
you always helped me alot😊😊
@farhanali4884
@farhanali4884 Жыл бұрын
Thanks bro for this
@Anita-cy4jv
@Anita-cy4jv Жыл бұрын
Sir I am beginning I am starting our journey with python I have no laptop no computer only with mobile I am do best and upload so many python latest I will plese
@kamal_kumar19k
@kamal_kumar19k 3 ай бұрын
Got it !!!!🎉🎉🎉🎉
@sneharamani2556
@sneharamani2556 8 ай бұрын
this is very good to learn
@deshantbrahman4462
@deshantbrahman4462 Жыл бұрын
just amazing broooo thankyou for this kind of content
@ishawaris632
@ishawaris632 Жыл бұрын
Great🙌
@victorb22622
@victorb22622 8 ай бұрын
Just before i came in comment section,,i can share my expression is , why i am learning python ,now its not entering in my mind .then I thought , I finished his 11 hours tutorial on python ,it was not as tough as this may be there may not be covered these things .but honestly i disspoint that why I am learning python!😅 ( Here I should also share , I m not searching job , just to add knowledge , so , I learn c, c# ,android ,js , html js CSS ,react , nodejs , machine learning, all from Harry's playlist) But at this point i feel ,why i m learning python that these is not entering in my mind😅
@ramjimishra5511
@ramjimishra5511 Жыл бұрын
Very nice👍👍👍👍👍👍👍👍 😍🥰
@Syed-j4h
@Syed-j4h 3 ай бұрын
People Objects have properties Getter changes a method into property Setter used to change the value of the object property It is very simple I also got frustrated a lot but listen me it's easy watch full video , if didn't understood watch last 2 to 3 videos It's easy
@amit_sahni22
@amit_sahni22 Жыл бұрын
Which is better React Js or NextJS for medium and large projects with Django Rest Framework? Please reply 🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏
@ezmayur
@ezmayur Жыл бұрын
On top of NextJs is best overall
@osamakamal9490
@osamakamal9490 Жыл бұрын
Hi Sir , I am from Pakistan and I am new here. Your teaching method is amazing. Sir, kindly guide me about that how can I access your notes that you write. Thank you for uploading such an amazing tutorial.
@arshdeepsaluja9445
@arshdeepsaluja9445 Жыл бұрын
if you want to access written notes then go python in one video (15hrs) in description you will find the notes
@justmadyo
@justmadyo Жыл бұрын
Tq sir✌️
@sorrybroimpro4028
@sorrybroimpro4028 Жыл бұрын
8/10 i want that you solve real life questions and give us for homework also apart from project otherwise overall its a great course
@RoyalPandit021
@RoyalPandit021 11 ай бұрын
Theya re already present on his channel
@girirajsanghani5565
@girirajsanghani5565 Жыл бұрын
grate👍👍👍👍👍👍👍👍👍👍👍👍
@harshalikawade2041
@harshalikawade2041 7 ай бұрын
Thank You
@skyupgamer5818
@skyupgamer5818 Жыл бұрын
thanks for this video
@srfahim23
@srfahim23 Жыл бұрын
This is 60 days mind blowing
@AshwaniKumar-s1v
@AshwaniKumar-s1v 4 күн бұрын
Sir, please make a playlist for the django framework
@PupunParida-b7m
@PupunParida-b7m 9 ай бұрын
best understaning example sir, bas data science roadmap with course vdo leaoo
@PrabhatKumar-sb5fk
@PrabhatKumar-sb5fk Жыл бұрын
thanks for your effort sirr.
@mayurn2985
@mayurn2985 6 ай бұрын
The way he is teaching like is preparing for exams and revision classes please do make it little slow so that beginners could cope up with your speed
@harmansingh4232
@harmansingh4232 Жыл бұрын
Hi Harry bro please make a series regarding algo trading in python ?
@moinuddinmoin392
@moinuddinmoin392 Жыл бұрын
class MyClass: def __init__(self, value): self._value = value In self._value why we use underscore (_) at the beginning of value???
@shivang7679
@shivang7679 Жыл бұрын
even im confused u got answer??
@Radhe_radhe2929
@Radhe_radhe2929 Жыл бұрын
Happy republic day 🇮🇳💗🔥😎
@naliyadrakushal5690
@naliyadrakushal5690 Жыл бұрын
2:05 ye _value variable konsa he ?? Hmne declare to nhi kiya he ye
@aniketkushwah
@aniketkushwah Жыл бұрын
Bhai blog ke liye best hosting provider kon hai GoDaddy & hostinger ya fir koi or plezz ripley
@ezmayur
@ezmayur Жыл бұрын
Hostinger
@aryanlokhande7421
@aryanlokhande7421 Жыл бұрын
*Not Clear* Getters and Setters Not Explain Well Before 60days everything was Nicely Explain ❤️
@Mayukh04
@Mayukh04 10 ай бұрын
Same with me.Decorators bhi clear nhi huye
@ayushkaprasad107
@ayushkaprasad107 6 ай бұрын
Private variable were not mentioned here which lead to so many confusion and took lot of time to understand the topic also disappointed becoz the topic wasnt well explained...wasnt easy to comprehend...
@md.abdullahalmamun960
@md.abdullahalmamun960 Жыл бұрын
i am watch your ragularly but some time mis your video but than i watch video regularly
@suhasbandal6784
@suhasbandal6784 Жыл бұрын
Bhai please make a video on excel, power bi, tableau, sql and data science
@harshitha.m.4189
@harshitha.m.4189 Жыл бұрын
yesssssssssssss we neeed it
@shivamchaudhary8592
@shivamchaudhary8592 Жыл бұрын
#Day60 Present Sir
@abhinav5786
@abhinav5786 Жыл бұрын
Present sir 😁
@vanshsharmaM4A1
@vanshsharmaM4A1 Жыл бұрын
Harry bhai replit ki theme customize kar lo, mast lagega
@pawanbadgujar3316
@pawanbadgujar3316 Жыл бұрын
Sir plz create DBMS tutorial also....🥺🥺
@harshitha.m.4189
@harshitha.m.4189 Жыл бұрын
yesssssssss we need it
@slayfantastic8070
@slayfantastic8070 Жыл бұрын
Keep growing brother
@techwala1038
@techwala1038 Жыл бұрын
Hello harry sir I'm from Lucknow please make a video on all modules of python
@zq.nain.
@zq.nain. 10 ай бұрын
If you want to understand it completely then write the same code 3 times on you computer, Best of Luck :)
@sheikhiftekharhossainabir7186
@sheikhiftekharhossainabir7186 7 ай бұрын
You present this tutorial very complexly. Upload a new tutorial for the alternative of this video
@shubhamthakur8294
@shubhamthakur8294 Жыл бұрын
do we always have to create getter first in order to create setter??
@mariamhasan3733
@mariamhasan3733 Жыл бұрын
Day #60 completed
@sahildeogade8414
@sahildeogade8414 Жыл бұрын
nice intro
@NEERAJ-dw9bt
@NEERAJ-dw9bt 9 ай бұрын
Present sir 🤚
@anishkumarmishra9620
@anishkumarmishra9620 Жыл бұрын
Harry bhai, getter is behaving like normal methods then what is the use of it ?? Without using @property annotation in your program(i.e getter ) it will perform its action .
@rajdeeprautela5658
@rajdeeprautela5658 Жыл бұрын
The use is encapsulation i.e. hiding variables of the class object so that they cannot be modified by anybody and if we need to modify, it can be done only by the specied methods. Using getters and setter made it possible to hide the original variable names (encalpsulation)
@GlitchyGlobe
@GlitchyGlobe Жыл бұрын
Yeh video difficult tha harry bhai
@ezmayur
@ezmayur Жыл бұрын
Brother make an video about DSA with python Full for interview and coding challenge 🙏🥰🥰🙏#CodeWithHarryDSA=Mastery
@abhimanyukarkara4218
@abhimanyukarkara4218 Жыл бұрын
5:08 can anyone tell me what line is priting the first line value 67 ?
@officialdreamplayz
@officialdreamplayz Жыл бұрын
obj.ten_value=67 print(obj.ten_value)
@tourwithgaumji8171
@tourwithgaumji8171 Жыл бұрын
Please upload a HR ABAP & debugging video,🙏🙏🙏🙏🙏🙏
@tourwithgaumji8171
@tourwithgaumji8171 Жыл бұрын
Sap ABAP & it's debugging.... 🙏🙏🙏🙏🙏🙏
@Haribansh-zt5qz
@Haribansh-zt5qz Жыл бұрын
Day60 completed harry bhai.
@farhanali4884
@farhanali4884 Жыл бұрын
Sir your video is not showing on replit what's the reason
@shubhamsaini4871
@shubhamsaini4871 Жыл бұрын
1:09 Harry bhai, ye bhi aap hi ne type Kiya hai😅
@thelifestylestand9366
@thelifestylestand9366 11 ай бұрын
What is the use of getters and setters Harry?
@NeelRajora_
@NeelRajora_ 8 ай бұрын
Getters and Setters are used to access Protected or Private Variables in a Class. In case you want to edit your user data in a Class without access to the source code (which is Protected, of course), then Getters and Setters will be used to Rewrite the Data.
@rahulsingbhate
@rahulsingbhate Жыл бұрын
Harry Sir please tell me Physics Walla ne full stack developer ka course Lunch Kiya hai please review karo aur batao ki ye course enough hai kya ya apki YT playlist par jo free hai o hi enough hai please batao
@vipulade6520
@vipulade6520 5 ай бұрын
In this comment section, there are few people who are saying that they didn't understood this topic at all and other side some are totally oppposite, who understood this topic with no doubts! thats strange 😵🤨
@Dmdmsmsj
@Dmdmsmsj Жыл бұрын
This chapter was too much hard i watched it 4 time and also done in replit 6 times
@laxmanbhaipatanilamanbhaip5273
@laxmanbhaipatanilamanbhaip5273 6 ай бұрын
Replit ki documentation kaishe access kare?? Please tell me
@chandankushwaha8932
@chandankushwaha8932 Жыл бұрын
awesome
@shivang7679
@shivang7679 Жыл бұрын
watched 1 times didnt understand and watched 2nd time little bit understand now going for other source video
@breadbutter8257
@breadbutter8257 Ай бұрын
class MyClass: def __init__(self, value): self._value = value def show(self): print(f"Value is {self._value}") @property def ten_value(self): return 10 * self._value @ten_value.setter def ten_value(self,new_value): self._value = new_value/10 obj = MyClass(10) obj.ten_value = 69 print(obj.ten_value) obj.show()
@ProgrammmeRoExe
@ProgrammmeRoExe Жыл бұрын
👍👍
@Radhe_radhe2929
@Radhe_radhe2929 Жыл бұрын
Day 60🔥
@jatinbhatt2222
@jatinbhatt2222 Жыл бұрын
Present Sir on Day-60 ✋
@shardulsharma6899
@shardulsharma6899 Жыл бұрын
Am i the only one who thinks he teaches like we already know everything? because he already knows everything, so its easy for him but not for neutral audience who is just beginning with python.
@TravelTales-a
@TravelTales-a Жыл бұрын
yes i also think that, few times he did that like in logging module i cant understand that and know in getter and setter he make sit a little rough
@bkxahmadplays6183
@bkxahmadplays6183 9 ай бұрын
@code with harry Make this video again in easy way 😅😅
@m.hassaanvi-f7835
@m.hassaanvi-f7835 Жыл бұрын
Exercise 5: import random import time score_comp = 0 score_human = 0 rules = "between snake and gun : the gun is going to win | between water and gun : the water is going to win | " comp = random.randint(0,2) if (comp == 0): comp = "snake" elif (comp == 1): comp = "water" else: comp = "gun" human = input("Enter '0' for Snake, '1' for Water and '2' for Gun and '3' for rules: ") if (human == '0'): human = "snake" print(f"Your choice is : {human}") elif (human == '1'): human = "water" print(f"Your choice is : {human}") elif (human == '2'): human = "gun" print(f"Your choice is : {human}") elif (human == '3'): print(f"the rules are stated below: {rules}") else: print("Error!:Read carefully and enter '0' for Snake, '1' for Water and '2' for Gun") if (human == "snake" and comp == "gun"): score_comp += 1 elif (human == "gun" and comp == "snake"): score_human +=1 elif (human == "gun" and comp == "water"): score_comp += 1 elif (human == "water" and comp == "gun"): score_human += 1 elif (human == "water" and comp == "snake"): score_comp += 1 elif (human == "snake" and comp == "water"): score_human += 1 else: print(f"Tie! both of the opponents have choosed the {human} ") if (human != '3'): print(f"Computer's choice is : {comp}") print(f"Computer's Score is {score_comp}") print(f"Your Score is {score_human}") time.sleep(50)
@bepositive271
@bepositive271 Жыл бұрын
you repeat the code too much time don't do hard coding do smart coding
@clashingtv2527
@clashingtv2527 Жыл бұрын
I love to use vscode😁 but Mera laptop itna power full nahi he ki wo replit ko run karsake
@whyiamhere09
@whyiamhere09 Жыл бұрын
Same
@AnilKumar-xl1ju
@AnilKumar-xl1ju Жыл бұрын
print("I am Present")
Inheritance in Python | Python Tutorial - Day #61
7:34
CodeWithHarry
Рет қаралды 191 М.
Introduction to OOPs in Python | Python Tutorial - Day #56
15:54
CodeWithHarry
Рет қаралды 355 М.
“Don’t stop the chances.”
00:44
ISSEI / いっせい
Рет қаралды 62 МЛН
Quilt Challenge, No Skills, Just Luck#Funnyfamily #Partygames #Funny
00:32
Family Games Media
Рет қаралды 55 МЛН
How to treat Acne💉
00:31
ISSEI / いっせい
Рет қаралды 108 МЛН
Decorators in Python | Python Tutorial - Day #59
13:05
CodeWithHarry
Рет қаралды 277 М.
Access Modifiers in Python | Python Tutorial - Day #62
11:43
CodeWithHarry
Рет қаралды 154 М.
THIS Is How You Should Be Making Getters & Setters In Python
7:32
5 Mistakes Beginner Web Developers Make (Avoid These)
12:09
CodeWithHarry
Рет қаралды 132 М.
10 Important Python Concepts In 20 Minutes
18:49
Indently
Рет қаралды 391 М.
What Do Software Engineers Actually Do? (It’s Not What You Think)
13:07
Top Skills to Learn in 2025
9:31
CodeWithHarry
Рет қаралды 387 М.
“Don’t stop the chances.”
00:44
ISSEI / いっせい
Рет қаралды 62 МЛН