Type casting in Python is easy 💱

Поделиться
HTML-код
  • Опубликовано: 4 окт 2024

Комментарии • 118

  • @BroCodez
    @BroCodez  2 года назад +50

    # type casting = The process of converting a value of one data type to another
    # (string, integer, float, boolean)
    # Explicit vs Implicit
    name = "Bro"
    age = 21
    gpa = 1.9
    student = True
    # print(type(name))
    # print(type(age))
    # print(type(gpa))
    # print(type(student))
    age = float(age)
    print(age)
    gpa = int(gpa)
    print(gpa)
    student = str(student)
    print(student)
    name = bool(name)
    print(name)

    • @hallilo7166
      @hallilo7166 2 года назад +4

      Hi brocode I love your videos you helped me so much starting with java and we can watch that all for free THX 😊

    • @Cp_elisha
      @Cp_elisha 10 месяцев назад +3

      bro what is name of tool you are using it's vscode or what

    • @balaportejean7015
      @balaportejean7015 5 месяцев назад

      @@Cp_elishapycharm
      And he downloaded python online
      Watch the first video of the series

  • @joysticksforjesuschrist
    @joysticksforjesuschrist 8 месяцев назад +26

    I love how bro almost put his GPA as 4.0 and then backspaced 😂

  • @Afghanistanfutsalfans
    @Afghanistanfutsalfans Год назад +7

    Outstanding Explanation I have ever watched!

  • @joanneosborne2428
    @joanneosborne2428 8 месяцев назад +5

    I appreciate your training approach; it's clear, enjoyable, and straightforward. Thank you for keeping it simple and to the point.

  • @punchline1729
    @punchline1729 11 месяцев назад +2

    Just found this amazing Python playlist, thanks for your help

  • @MohyDev
    @MohyDev Год назад +24

    I have always believed that education is the ultimate code to crack. Thanks to Bro Code, I have been able to unlock some of the most complex programming languages and computer science concepts with ease. Your videos have been instrumental in helping me level up my skills. So, from the bottom of my heart (and stack), thank you for being the best educational channel out there. Keep up the good work, Bro Code! Your dedication to educating the masses about programming languages and computer science has been truly inspiring. I would love to connect with you and learn more about your journey and how you became one of the best educational channels out there. again, thank you for being a constant source of knowledge and inspiration for us all. You're the real MVP, Most Valuable Programmer

  • @earth7641
    @earth7641 2 года назад +4

    I glad to see your channel grow and learning program from your channel, being game programmer is always my dream.

  • @abdulhannan-18
    @abdulhannan-18 10 месяцев назад +8

    imp Only strings can concatenate.
    student = True
    print(student)
    print(type(student))
    student = str(student)
    print(student)
    print(type(student))
    print("Hello" + student)
    True
    True
    HelloTrue

  • @brittany8367
    @brittany8367 8 месяцев назад

    Thank you for breaking everything down into such an easily understandable explanation!

  • @tongtruonghai331
    @tongtruonghai331 2 года назад +3

    3rd hello!!, all ur vids are good that's i got a improve in programming.

  • @user-ace96plays
    @user-ace96plays 10 месяцев назад +2

    NICELY DONE BRO...❤

  • @munakusik
    @munakusik 2 года назад +5

    Have watched u since first long collection of videos
    Nice to see that u still help to other people
    Btw wanna see more guides by you
    thanks

  • @脱不完的头发
    @脱不完的头发 7 месяцев назад

    very logical and useful, making the complex theory understandable!!

  • @remusonthisacc
    @remusonthisacc 5 дней назад

    Very good tutorials!

  • @RAHAT_PY
    @RAHAT_PY Год назад +1

    bro it's awsome
    i admit here new
    INSAALLAH soon i will finised the playlist💖

  • @kingmorbcr1172
    @kingmorbcr1172 2 года назад +5

    i love this channel

  • @sunny34504
    @sunny34504 Год назад

    I can't believe that I found an easy way to learn python! I'm so grateful thankss a lott!!

  • @haltsmaul.
    @haltsmaul. 2 года назад +16

    Probably important to note that in other programming languages such as Java, you can't just change the data type of a variable.
    int num = 3;
    num = (float) num;
    This would throw an exception because you can't assign a float to an integer variable.

    • @BroCodez
      @BroCodez  2 года назад +11

      that's a good point

    • @Maaaaaaa7777
      @Maaaaaaa7777 Год назад

      @haltsmaul I come from Java as well, there is a way to do that in python?

  • @XNightmaresX09
    @XNightmaresX09 2 года назад +4

    Bro code : Uploaded a video
    his fans be like : Finally we can find inner peace

  • @WINDOWSUSER-q4s
    @WINDOWSUSER-q4s 10 месяцев назад +1

    NICELY DONE...❤

  • @soyozzz
    @soyozzz 2 года назад +7

    Wow, i'm the first one here. Hello and thank you for the video!

  • @tourakaianimation7766
    @tourakaianimation7766 2 года назад +9

    I am watching your videos during the lectures because the professor is boring. The efforts you put into each video is incredible.
    Can you also make tutorials about MIPS assembly language?

    • @BroCodez
      @BroCodez  2 года назад +9

      I'll take a look at MIPS but I do have a lot of other work to do too :(

    • @theye29
      @theye29 Год назад +3

      @@BroCodez just a question, do you work as a programmer? if yes, how much do you make? i am thinking in become a senior programmer but im unsure

  • @ahmetunaldi7601
    @ahmetunaldi7601 24 дня назад

    Thank you very much Bro...
    Eline sağlık...

  • @Faulty21
    @Faulty21 Год назад +1

    Very helpful I appreciate the teaching 🫵🏾💯

  • @HsuMonMonThant
    @HsuMonMonThant Год назад

    Thank you for this wonderful video.

  • @getone135th
    @getone135th 9 месяцев назад

    thank you for your time and efforts and teaching me this.

  • @abdulhannan-18
    @abdulhannan-18 10 месяцев назад +1

    Basically bool is to check whether that INPUT IS GIVEN OR NOT.
    userinput = input("Your name: ")
    userinput = bool(userinput)
    print(userinput)
    if user give any input then True if user does not give any input then False.
    #code1
    name = "Bro"
    name = bool(name)
    print(name)
    True
    #code2
    name = "" #empty string. As there is nothing that's why it will be false.
    name = bool(name)
    print(name)
    False

  • @mohamad_subhi
    @mohamad_subhi 7 месяцев назад

    Perfect. absolutely perfect🤯🤩🤩

  • @unknowndrharry
    @unknowndrharry Год назад

    Your crazy man, so easy to understand, even tough I am from arts background.

  • @st0kersenpai
    @st0kersenpai 11 месяцев назад +2

    in my pycharm version when i convert a float to string it just round offs the number like 4.9 becomes 5 and while converting boolean to an integer true becomes 1 and false becomes 0

  • @krissavagelive
    @krissavagelive 8 месяцев назад

    Great explanation. Thanks Bro!

  • @erdemdemir2852
    @erdemdemir2852 4 месяца назад

    random comment because this tutorial is great

  • @joncaldwell4753
    @joncaldwell4753 4 месяца назад

    Thank you

  • @mdjhangirislam5237
    @mdjhangirislam5237 11 месяцев назад

    this chanel is very helpful for me! thanks bro code

  • @EthioMediaCorporation
    @EthioMediaCorporation Год назад

    Great explanation

  • @shaikakhil4h136
    @shaikakhil4h136 Год назад

    Recently I seen ur channel bro
    I like the way ur teaching bro
    Tq bro keep doing like this for us bro💕

  • @wmstram1
    @wmstram1 Год назад

    Watched it. Liked it.

  • @kangyuan9084
    @kangyuan9084 8 месяцев назад

    Grateful

  • @Janush___
    @Janush___ 4 месяца назад

    thanks bro

  • @BurhanTosuner
    @BurhanTosuner Год назад

    helpfull and thankyou

  • @marlor3200
    @marlor3200 7 месяцев назад

    appreciate your bro

  • @jhassee
    @jhassee Год назад +1

    Appreciate you "Bro"

  • @FernandoLuna-f9p
    @FernandoLuna-f9p Год назад

    wow

  • @Curious_Clover
    @Curious_Clover 5 месяцев назад

    Interesting. I need to know how to do this in Java.

  • @alanjaf9879
    @alanjaf9879 Год назад

    This was usefull, thank you

  • @Abzarad
    @Abzarad 5 месяцев назад

    thanks Bro

  • @Markos1979
    @Markos1979 Год назад

    you are the best.

  • @cozycubix
    @cozycubix Год назад

    good job , thanks

  • @CritEnjoyer
    @CritEnjoyer 2 месяца назад

    thank

  • @kalyanm6426
    @kalyanm6426 Год назад

    Nice😂😂

  • @AmirhosseinAZB
    @AmirhosseinAZB 10 месяцев назад

    very helpful bro!

  • @zahraalemi1872
    @zahraalemi1872 8 месяцев назад

    usefull

  • @XNightmaresX09
    @XNightmaresX09 2 года назад +1

    Please see my comment and hope you liked it because TBH I am your big fan and you reached programming to me and am still watching your playlist of python cuz I wanna learn it!

  • @kalyanm6426
    @kalyanm6426 Год назад

  • @krzysztofbartoszek2386
    @krzysztofbartoszek2386 2 года назад

    Finally thank you very much

  • @tixer9786
    @tixer9786 Год назад

    Thanks

  • @shantanupundir9965
    @shantanupundir9965 3 месяца назад

    Done

  • @abdulhannan-18
    @abdulhannan-18 10 месяцев назад

    When typecasting an integer to bool, it is always True for any positive or negative number except for.
    For zero, it is false.
    #code
    age = 19
    age = bool(age)
    print(age)
    True
    #code
    age = 0
    age = bool(age)
    print(age)
    False

  • @YGhustler1
    @YGhustler1 2 месяца назад

    yeyeyey

  • @HsoliDer
    @HsoliDer Год назад

    thank you bro

  • @bekturasanbekov1979
    @bekturasanbekov1979 Год назад

    thx 4 vid bro !

  • @officiallypaula510
    @officiallypaula510 Год назад

    thanks

  • @vxmp-cl5kc
    @vxmp-cl5kc 3 месяца назад

    i love you bro ur the god

  • @chinmaydwivedi0712
    @chinmaydwivedi0712 3 месяца назад

    Random Comment
    already subscribed so i am an Authentic Fellow Bro
    OK??

  • @abdulhannan-18
    @abdulhannan-18 10 месяцев назад

    gpa = 1.9
    gpa1 = int(gpa)
    gpa2 = (gpa%1)
    gpa3 = gpa1 + gpa2
    print(gpa3)
    1.9

  • @tennybabcock5146
    @tennybabcock5146 4 месяца назад

    thank you bro code

  • @realGrantT
    @realGrantT 3 месяца назад

    this dude sounds like chris McLean

  • @im_not_molhem
    @im_not_molhem 10 месяцев назад +1

    name = “Bro Code”
    age = 22
    rating = 100.0
    useful = True

  • @sagal5109
    @sagal5109 Год назад +1

    What program do you use to code? (Btw, I'm beginner :))

    • @howtocraft2415
      @howtocraft2415 Год назад +1

      I know I am late but in this video he is teaching python

  • @illubillu69
    @illubillu69 7 месяцев назад

    my gpa would be a solid ahh 4.0 no no no 1.9

  • @ahmedisonthego
    @ahmedisonthego 9 дней назад

    what about str into int and int into str??

  • @fozero0
    @fozero0 Год назад

    thx bro :D

  • @muhammadkarangwa
    @muhammadkarangwa 3 месяца назад

    I’m on the train of bros

  • @NguyenHoang-yo5gg
    @NguyenHoang-yo5gg 2 года назад

    can you do one more Winform course I'm having a problem with it, Bro Code please help me :((

  • @manamnice
    @manamnice Год назад

    Any git and Linux tutorial?

  • @APTsec
    @APTsec 3 месяца назад

    Hey Girl... I don't care if you are not my type. We can always typecast

  • @abdulhannan-18
    @abdulhannan-18 10 месяцев назад

    student = True
    print(student)
    print(type(student))
    student = str(student)
    print(student)
    print(type(student))
    True
    True

  • @user-ace96plays
    @user-ace96plays 4 месяца назад +1

    3/106

  • @radinahmadi2211
    @radinahmadi2211 6 месяцев назад

    I love you

  • @umcanalsemvidanoyoutube8840
    @umcanalsemvidanoyoutube8840 Год назад

    You now how numpy casting works in your C source code?

  • @Dex-uq8ff
    @Dex-uq8ff 4 месяца назад

    Free algorithm

  • @makoblox
    @makoblox 2 года назад

    yes more python

  • @nilbogmax
    @nilbogmax Год назад +1

    how does every one else do a course like this. do you use the same file for every single episode or do you save a separate one for each or do something else?

    • @passportbro904
      @passportbro904 Год назад +1

      You must be far in there now, I hope you used seperate files or you may of been confused lol, I'm learning also and love it

  • @Itzyaboyjammy
    @Itzyaboyjammy 10 месяцев назад

    can i use vs code instead

  • @AyaanZaheerMusic
    @AyaanZaheerMusic 7 месяцев назад

    do you have c or c++ course

  • @Poifix
    @Poifix Год назад

    So is type casting in Py the same as type conversion in JS?

  • @Kumaraniket2212
    @Kumaraniket2212 Год назад

    What is GPA full form?

  • @prizepig
    @prizepig Год назад +2

    a random comment

  • @Ranxx7
    @Ranxx7 2 года назад

    Oh

  • @UIEC_MANESH_RAM-tb1hb
    @UIEC_MANESH_RAM-tb1hb 2 года назад

    can i please know which country ur from ??

    • @BobaFett12357
      @BobaFett12357 2 года назад

      Isn’t it obvious he’s an American?

  • @Mastodonte71
    @Mastodonte71 Год назад

    random comment :)

  • @Ai-iann
    @Ai-iann 6 месяцев назад

    Random comment

  • @nerdface1260
    @nerdface1260 2 года назад

    "Type casting is easy"
    Also me: why code no work I spend 5 hours trying to solve and I saw this vid and I was at the problem💀

  • @Hd-dzx
    @Hd-dzx Месяц назад

    random comment

  • @Xomeyphen
    @Xomeyphen Год назад

    A Random Comment

  • @RahulSingh-xd4qj
    @RahulSingh-xd4qj Год назад

    random

  • @daydarasensei12
    @daydarasensei12 Год назад

    RANDOM COMMENT( ̄▽ ̄)

  • @Istikomah-qr1ij
    @Istikomah-qr1ij Год назад

    thank you Bro

  • @radinahmadi2211
    @radinahmadi2211 6 месяцев назад

    I love you

  • @sainishantbiradar8022
    @sainishantbiradar8022 6 месяцев назад

    Random comment