The Differences Between C# & Python

Поделиться
HTML-код
  • Опубликовано: 17 июл 2024
  • C# & Python are both great languages! But what makes them different?
    Check out more lessons in this course: • Everything You Need To...
    SUBSCRIBE FOR MORE: sefdstuff.com/science
    SUPPORT ON PATREON: / jabrils
    Please follow me on social networks:
    twitter: sefdstuff.com/twitter
    instagram: sefdstuff.com/insta
    reddit: / sefdstuff
    facebook: sefdstuff.com/faceb
    REMEMBER TO ALWAYS FEED YOUR CURIOSITY

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

  • @marian519
    @marian519 5 лет назад +447

    At 1:50, you should say you *declare* the type, not "cast" it. Typecasting is something else.

    • @Ownage4lif31
      @Ownage4lif31 5 лет назад +6

      marian519 yea I was confused about this too lol

    • @DukeBG
      @DukeBG 5 лет назад +19

      agreed, it's not very helpful to use terms that have some loaded meaning in this area even though they might seem like synonyms.

    • @flareriderdash2331
      @flareriderdash2331 5 лет назад +12

      *triggered*

    • @joeeyaura
      @joeeyaura 5 лет назад +11

      i cringed a little at that too

    • @dummypg6129
      @dummypg6129 5 лет назад +2

      Typecast from undefined?

  • @ironfoot1938
    @ironfoot1938 4 года назад +47

    c#: [var] : am i a joke to you?!?

    • @wendten2
      @wendten2 3 года назад +6

      [dynamic]: hello mere mortal

  • @Waffle4569
    @Waffle4569 5 лет назад +35

    You can use "var" in C# to avoid explicitly declaring the type.
    Also, you can use "dynamic" for variables that change type.

  • @Phoenix-ip5kg
    @Phoenix-ip5kg 3 года назад +253

    For me...
    Python: is good for learning coding as a beginner
    C#: good for actually coding

    • @DaniloSilva-pl3sq
      @DaniloSilva-pl3sq 3 года назад +28

      So why is Python widely considered the best language for Machine Leaning, Deep Learning and Data Science?

    • @DaniloSilva-pl3sq
      @DaniloSilva-pl3sq 3 года назад +17

      Not to mention back-end web development with frameworks such as Django and Flask

    • @Phoenix-ip5kg
      @Phoenix-ip5kg 3 года назад +28

      @@DaniloSilva-pl3sq that was 3 months ago. Now i think about it differently. C# is good for gaming (which was my field) but python is good for the purposes you’ve mentioned.

    • @CoachVicTheLandInvestor
      @CoachVicTheLandInvestor 3 года назад +49

      @@DaniloSilva-pl3sq because data scientist can focus on the algorithms and not the code. they also arent writing code for production purposes, but to train models and collect data. When its time to code an actual app or program that uses said models, then most dont use python, they switch to a more performant language like C++.

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

      @@Phoenix-ip5kg godot also exists

  • @TammonOG
    @TammonOG 5 лет назад +128

    Python is my favourite language rn, I just don't like how when I accidentally add an extra space everything stops working and it's usually difficult to find

    • @qwerty975311
      @qwerty975311 5 лет назад +5

      I have had the same thing happen to me especially when copying and pasting code I was testing in idle.

    • @fgbeast5805
      @fgbeast5805 5 лет назад +13

      Keep in mind that C is a faster language for your computer to process

    • @mcrazy2080
      @mcrazy2080 5 лет назад +24

      @@fgbeast5805
      But python is way faster for me to implement anything. It's for testing out your ideas and it's fast enough most of the time.
      Today's computers are fast enough for python, unless you are doing many iterations or system programming.

    • @QuantumFluxable
      @QuantumFluxable 4 года назад +14

      I prefer everything that's got explicit variable declarations. it's clearer in terms of what parameters to give to a function. if i'm hacking together something quick in python and come back to it a month later i may have to check the correct way to pass params to that old function before i do anything with it, this is all "automatically" taken care of in something like C#, essentially forcing me to document my params at least a little bit

    • @its.arjun.s
      @its.arjun.s 4 года назад

      @@fgbeast5805 what about golang

  • @zeppelin0110
    @zeppelin0110 5 лет назад +81

    These 2 are my favorite programming languages, but I have to say, I think C# is the 'better' one. Yes, I know they are different and they are used differently (e.g. Python is more used by data scientists while C# is more popular in a business environment) - but I think C# is more modern and advanced. I will give just 1 example to prove this - Linq. While Python has list comprehensions and lambdas, and they certainly are powerful, they are nowhere as elegant and convenient as Linq. All that said, I do like both languages a lot, but have a slight preference for C#.

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

      What about Java? Should I learn Java first, before I learn C# or Python?

    • @QuantumFluxable
      @QuantumFluxable 4 года назад +16

      @@omairtech6711 unless you want to program android apps specifically I would steer way clear off Java. C# is a lot like Java but more powerful, more commonly used (again, except for android of course), less cumbersome, more performant and you can even program games in it (using Unity). The only successful PC game using Java that I know of is Minecraft, and that has constant issues with memory leaks and stuttering due to Java garbage collection. I'm not a big fan of Python either but it's still a better choice than Java. Feel free to ask if you got further questions :)

    • @omairtech6711
      @omairtech6711 4 года назад +3

      @@QuantumFluxable Thank you! I have already started learning Java. Should I switch to C#? Or should I finish learning Java? I am coming back to coding. I used to program in Delphi. Later I used Microsft VisualBasic.Net. I haven't coded in years. Started relearning just a few days ago.

    • @QuantumFluxable
      @QuantumFluxable 4 года назад +6

      @@omairtech6711 I suppose that depends on how far you got into Java already, but I've learned a lot of languages over the years and eventually realized that one can never "learn" a programming language fully, it's more like a tool: I'm sure you know how to use a hammer, but can you use it as well as a carpenter or a smith? probably not, but that doesn't mean you should never pick up a hammer, it just means you could be more efficient with it. Programming languages are the same, once you got the basic concepts you can use them to do all sorts of things, and while you do that you continue learning the tiny details and become better at using the language, but you never finish learning it.
      That's a super long way of saying "it doesn't matter as much what language you learn". C#, when first introduced, was being advertised as a Java that isn't Java. Basic syntax between the two is very similar, so it shouldn't be a problem for you to switch if you want to do that, especially since you used to program in Delphi.

    • @QuantumFluxable
      @QuantumFluxable 4 года назад

      @Memento Mori Well, that completely depends on what you want to do with your startup. If your startup is gonna produce Android apps, it's Java. Electronics? You better hire a C programmer for microcontrollers if that's relevant. Websites? Ruby on Rails. And so on...

  • @SVVV97
    @SVVV97 5 лет назад +167

    First off: big fan; but there are some mistakes:
    The types are declared not cast
    Python doesn't need to declare variable types but not because it's Interpreted but because of it's type system which is dynamically & implicitly typed (while still being strongly typed I think?); Whereas C# usually is statically, weakly and explicitly typed (with Support for dynamic typing and type inference(recommended by MS))
    If there are errors in this please correct me :D

    • @SVVV97
      @SVVV97 5 лет назад +3

      Also C# has a model that's similar to (c)python's: compile to bytecode or some IR and then be interpreted by a VM (where C# then is JIT compiled) afaik

    • @gernottiefenbrunner172
      @gernottiefenbrunner172 5 лет назад +8

      I'm pretty sure c# is strongly typed too (except if you use pointers). At least, I haven't yet stumbled over a scenario where you can accidentally access memory as the wrong type

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

      I'm going to leave here, if you don't mind.
      If anyone wants to clear the output, type 'Ctrl + Shift + P'. It will pull up a window, then type 'Clear Output'.
      I searched for this problem, but didn't find an answer. Thankfully someone said to do it with the terminal, so I guessed if I used output instead, it would work.
      Also, save your code before you run it, otherwise it will run a previous save of the code. Or if you didn't save it at all, it won't run. At least that's what happened in my case.

    • @PlutoisaPlanet
      @PlutoisaPlanet 4 года назад +3

      The guy who made this video has no clue about C# lol. He doesn’t realize all the other uses of C#, .NET’s great documentation, plus the consistent and great functionality included out of the box. The only thing he talked about was syntax. Lol.

    • @zzedixx
      @zzedixx 4 года назад

      @@PlutoisaPlanet he's a pro at c#, since it's the language used in unity and he's a unity god

  • @FurryDanOriginal
    @FurryDanOriginal 4 года назад +20

    I'm not an expert and also no native speaker, nor very informed with the general programming terminology, so if there's anything you think is wrong, feel free to correct me. In fact I don't know most of the stuff but am making educational guesses instead based on how the discussed points in this video make sense to me.
    In C#, the reason why you have to give a variable a type and can't change its value to a value of another type is not necessarily bad (and not there because the language can't figure it out by itself, in fact there are ways it can which I will point out later) but rather a design choice. When declaring a variable as one type it barely ever makes sense to give it later on a value of another since one variable should always represent one specific "idea". And almost all of the time that one won't change its type since it's bound to it.
    If you want C# to figure out the type by itself you can just always use the "var" keyword which will make the variable of the type of the value that you're assigning it to. The only times you can't do that, as far as I know, are when you're just declaring a variable but not initializing it, or you're giving a non-struct object it's default value "null" since that could be valid for any reference type and couldn't be figured out just by the value a variable is being assigned to.
    If you want to use a dynamic type meaning it can change its value type afterwards, even though that has very limited practical uses with the main disadvantage being that the compiler has no clue on what type it is and therefore what fields, properties and functions it contains, just use the keyword "dynamic".
    That being said, I absolutely do love python for its syntax of not having to resort to semicolons and espacially curly braces. Since you want to format your code to be readable anyways, in my opinion it absolutely makes sense to merge the syntax and indentation into one to avoid much visual noise.

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

      In my opinion it makes the code easier to read to have the curly braces and semicolons. Idk, I guess my mind just processes it wierdly.

  • @Imperial_Dynamics
    @Imperial_Dynamics 5 лет назад +35

    nice video. Personally I prefer C#, it is strongly-typed meaning far easier to find errors while you are writing the code. With Python runtime errors are a nightmare

    • @vxsniffer
      @vxsniffer 4 года назад +6

      you are wrong, Python is strongly typed too... Python is dynamically typed and C# is statically typed and that's true difference... it's good to understand some terms before you start to complain... frankly, from your post, I doubt you did anything serious in Python, hence best way to get rid of "nightmares" is to wake up ;-)

    • @jeromep5294
      @jeromep5294 4 года назад +9

      @@vxsniffer pretty petty, are you? He's not wrong, though, just did not get the right term. I know both languages and this is one of the reasons I personally prefer C# or any statically-typed language, respectively.

    • @vxsniffer
      @vxsniffer 4 года назад

      @@jeromep5294 - there is all about terms, syntax, remember? statically and strongly are different ideas, hence my comment.

    • @QuantumFluxable
      @QuantumFluxable 4 года назад +1

      @@vxsniffer "it's good to understand some terms before you start to complain" just makes you seem like a condescending asshole though. doesn't matter if they used the wrong terms, the opinion of Imperial Dynamics still shows they understood the concepts.

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

      @@QuantumFluxable - why so touchy, better think of those misled by author messing basic terms...

  • @djpeterson7479
    @djpeterson7479 5 лет назад +52

    Bear in mind that specifying the type of the variable in C# exists for a reason. It's there so that both the compiler and the code writer understand a variable is being declared and used. This comes in handy for catching bugs as a typo will cause your code to not compile. As opposed to Python, a typo will simply create a new variable and you'll have a logic error (typically harder to debug) instead of a compile time error. I'm writing my own scripting language and ended up switching from Python to C# style for this very reason.
    As a quick aside, in C#, you don't need to always specify the type when declaring a variable. If you are declaring and initializing, you can use `var` and the type of the variable will become the type of the expression.
    I'm excited to learn Python because of how terse it is, but honestly it represents a lot of the things I've been trying to run away from: non-strict variable declaration, dynamic type systems and a focus on mutability. After over a decade of experience, I find these things to be more of a hindrance than a benefit especially as your code base grows.

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

      @Shahar Erez you're talking nonesense

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

      @Shahar Erez It wasn't trolling. Man, do you know about architecture and prediction? When you're writting some code, you need to understand for which purpose and trying to predict what it will be in future. So it sounds weird to me, that it's much easier to use language without strongly typing. It means that you don't understand what you're writting.

  • @jhandaniellopez4596
    @jhandaniellopez4596 5 лет назад +7

    i really love how he makes his videos like the "SYNTAX" part. Although it is simple for many, I'd like to learn how he does his videos.

  • @ClarenceSimukanzye
    @ClarenceSimukanzye 4 года назад +89

    well, C# is power!

    • @unlxck3255
      @unlxck3255 3 года назад +1

      @Glizzster 多 Type Console.ReadKey(); instead of ReadLine so you can just press any Key you want and it closes.

    • @theindianyouwatch
      @theindianyouwatch 3 года назад

      @Glizzster Console.WriteLine("bruv you indian?");
      Console.ReadLine;

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

      He just described everything I hate about python and love about everything else.

  • @barryjohnson4340
    @barryjohnson4340 5 лет назад +2

    Thank you for this video. I have been out of programming for a while and this has helped me quite a bit.

  • @brandondemeris8706
    @brandondemeris8706 5 лет назад +4

    I love ur videos man, going to school for mechanical engineering and computing technology. U make spending all my time watching yt videos feel productive XD

  • @stonefreak5763
    @stonefreak5763 4 года назад +8

    5:25 you can use the datatype: var -> variable, in c++ it is auto.

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

    Really thought you did a great job outlining the syntax. Plus seeing the side by side comparison drives the point home nicely.

  • @tinym00n
    @tinym00n 5 лет назад +46

    I don't want to be that guy but have you heard of dynamics in c#.

    • @scarletdcruz7843
      @scarletdcruz7843 5 лет назад

      What do you mean?

    • @iLinked
      @iLinked 4 года назад +1

      i was thinking about that as well lmao

  • @pylewastaken
    @pylewastaken 4 года назад +153

    I think c# is a lot easier since I get less bugs than python

    • @theheroofthevirgins1487
      @theheroofthevirgins1487 4 года назад +5

      True xD

    • @wewe-fx6un
      @wewe-fx6un 4 года назад +15

      In that case, you don't know how to code.

    • @ReactJSX
      @ReactJSX 4 года назад +56

      @@wewe-fx6un if you don't make mistakes whilst coding, you've obviously never touched an IDE before.

    • @wewe-fx6un
      @wewe-fx6un 4 года назад +4

      @@ReactJSX I use vim. Any problem?

    • @ReactJSX
      @ReactJSX 4 года назад +18

      @@wewe-fx6un if you don't make mistakes whilst coding, you've obviously never touched an IDE before.

  • @talwat321
    @talwat321 3 года назад +6

    If your thinking which one to learn, take a minute to reflect on what you want to do with code. Wanna make games? C#. Wanna make bots? Python. They are good for different things. If you have enough time, then try to learn both. Learning another language usually cant hurt :)

  • @ThatGuyDownInThe
    @ThatGuyDownInThe 4 года назад +37

    these are the exact two languages I want to learn, how exciting

  • @liambrem223
    @liambrem223 5 лет назад +2

    Thank you so much for creating the tutorial vids!

  • @solsticeivy
    @solsticeivy 4 года назад +1

    I love the way you explain things. You're very easy to follow ^^

  • @dxsaigon
    @dxsaigon 4 года назад +1

    This was such a clear tutorial! Thank you!

  • @foxrumor
    @foxrumor 5 лет назад +6

    Great tutorial. I'd love this to be a whole series. Learning python and c# at the same time.

    • @foxrumor
      @foxrumor 5 лет назад +2

      Nvm, I just noticed it is a whole series and I'm dumb. Thanks Jabrils!

    • @Jabrils
      @Jabrils  5 лет назад +3

      ;)

  • @wilmararias2083
    @wilmararias2083 4 года назад +4

    For big projects I choose c# every single the day.
    C# makes the code consistent and give you more control The chance to build stable secure apps is bigger. Python in the other hand has more focus on the business logic o ('human logic') Wich is great when you are dealing with data science you don't want to mess with data types you write spaghetti code that just work you don't need the same control , but if you work with huge projects this can easy get annoying and hard to work so I only use python where I need fast development without the need of that kind of code control.

  • @curtisbell2872
    @curtisbell2872 4 года назад +1

    That was extremely clear and helpful!

  • @1166NYC
    @1166NYC 4 года назад +2

    I only use Python so this video was very informative for me to see what C+ is like! Your videos are super dope and I've liked them since before I got into data science. I'm looking forward to your next video

  • @KEMBL
    @KEMBL 4 года назад +7

    6:42 "seam eye colon" that is great ;)

  • @DeepakKumar-uz4xy
    @DeepakKumar-uz4xy 5 лет назад

    Man you are one of the best tutor or teacher. I have ever seen so far. Can u make tutorials on data science tutorials I don't know you have time or not. But I want to learn from your channel

  • @codehsanswers8866
    @codehsanswers8866 5 лет назад

    Hey @Jabrils ! Been watching ur videos, they are very good, thanks. I got a question, what's an application I can code an app (for android and ios) on my windows computer? thank you

  • @catvssnake6639
    @catvssnake6639 5 лет назад

    damn i needed this video! thank you so much this playlist is great!

  • @iLinked
    @iLinked 4 года назад +3

    i think it's pretty easy to see which language jabrils uses on a day-to-day basis

  • @dzundzanify
    @dzundzanify 5 лет назад +1

    Can you do the same playlist(with this format) about Tensorflow and Tensorflow? Begining with tensors etc...

  • @theheroofthevirgins1487
    @theheroofthevirgins1487 4 года назад +11

    I started with python with no code experience did it for 5 month I was hype but slowly started not liking it I build some simple games like hang man and guess my number everyone say start with python it easy to understand they right about that but the reason I wanted to start coding to build games so my friend brother told me why not try C# and use unity with it to build games he also told me is best to try other languages u might like them better he was right I started using c# idk why I found it more easy to use then python. If you are a person who want to make game I strongly suggest like the guy in the video say use c# to make games I been using C# now for a month and learn a bit but love this language more then python :) also grate video sorry for the long comment I just want to let people know if you are not enjoying a language try different one u never know u might find other languages much easier and also like the guy in video say some languages are use for different stuff grate video mate

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

      I’m in the exact same position. Everyone told me to learn python first for beginners. I used python for 3 months making simple games like dodging blocks, sprite walk test, and space invaders. But I was disappointed how slow python in running bigger games I wanted to make, the errors are so hard to find, and many python jobs are in data science which I’m personally not interested in. I started learning JavaScript, CSS, and HTML for web development and starting C# and unity and it runs so smooth and well and can do way bigger projects. I think python is good for beginners and people interested in data science, but C# is where it’s at for game development

    • @noterenyega9158
      @noterenyega9158 3 года назад +1

      I don't know about u guys, but I like both languages. There is a olynpiad thing going on in my school so that's why I'm learning Python first. I want to learn both and be able to make some cool games on Godot Engine :D

    • @HeilerKGD
      @HeilerKGD 3 года назад +1

      im in a similar case :D i started learning with HTML,CSS,Java ( with m1m0 app) and got interested in gameprogramming, i tryed unity , unreal and godot and fall toadally in love with godot.... but now the big question .... shoud i learn C# or python ( godot use Gdscript also an version of python, and at the moment i make one month scool course for C# ... but STILL i dont can choose like i have all time, an hard time when i shoud choose) ... python i like a bit more at the moment but i dont like it when i have really long loading or complicated games when it work better with C#

  • @benotyourboss
    @benotyourboss 4 года назад +1

    I am using a macbook and try to follow along, when I hit save before play then the following message appears in my VS Code window in the bottom right corner: Linter pylint is not installed. - however when I try to install it then the following appears: There is no Pip installer available in the selected environment. - what does this mean and how do i get ridde of this issue?

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

    I've only been programming for a few months, but these two languages are my favorite.

  • @lubaka8269
    @lubaka8269 5 лет назад +19

    Great video, but for the love of God, CW + Double Tab to write Console.Writeline!

    • @lolbot2312
      @lolbot2312 4 года назад +1

      Thank you for the tip i did not know you could do that

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

      @@lolbot2312 There are a lot of code snippets, which just makes C# so much fun ;)

  • @IgorDz
    @IgorDz 5 лет назад +28

    Dude! Wow! A sincere print('thank you!') for doing this!
    My motivation is back on track!

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

    REQUEST: Please, could you create another video of a comparison between another 2 languages? Maybe JavaScript and whatever language you like to choose?

  • @davidsewilliams
    @davidsewilliams 4 года назад

    For the changes to update when you press the play button in Python apparently you have to save first. I turned on Autosave. Is that recommended?

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

    Nice video! Hope you don't mind me saying that there's a couple things here that are not quite right though.
    Static typing in C# (i.e bool something = true) isn't the same as casting. Casting is where you implicitly or explicitly cast one data type into a different one (i.e something.ToString()).
    An "interpreted language" (like Python is) does refer to the fact that it "interprets" variable types. Instead, this behaviour means that Python is a dynamically typed language, rather than a statically typed language like C#. Static typing means that if string value = "Something", the variable "value" must now always contain a string. In Python, I don't think you can set types explicitly, and variables can contain whatever you want them to! Crazy town!
    An interpreted language is one that has no "build" step, like C#. Instead, a separate program called an interpreter will execute the code. C# is compiled into machine code and executed directly by the processor.

  • @Thruster86
    @Thruster86 5 лет назад +1

    Just for some feedback, I feel like it would be helpful to make a video before this in the playlist that goes over some of the programming terms used in this video.

    • @starisma4215
      @starisma4215 5 лет назад

      Those terms are in the playlist that's in the description.

  • @m.t-thoughts8919
    @m.t-thoughts8919 4 года назад

    That command line terminator in Python explenation helped me to understand Python better thx, m8.😊

  • @TomSuckAtFinance
    @TomSuckAtFinance 5 лет назад +1

    Could you do a project which contains all these variables.

  • @ikec-pw5sb
    @ikec-pw5sb 5 лет назад +2

    Is it me or with software, did you patch this whole tutorial series?

  • @weirdwordcombo
    @weirdwordcombo 4 года назад

    In C# i would replace bool and int with var. Essentially the compiler will still complain when you use the variable in invalid places, so type checking is still done in this case.

  • @thelegendofme7520
    @thelegendofme7520 5 лет назад +2

    When I tried doing the boolean on python i just kept getting "'python' is not recognized as an internal or external command,
    operable program or batch file." Can someone please help me

    • @Sisyphus_2468
      @Sisyphus_2468 5 лет назад

      Well it works for me, whay I.D.E. are you using? Maybe it just doesnt recognize that you are using python

  • @PythonPlusPlus
    @PythonPlusPlus 5 лет назад

    I like python, because it’s quick to get applications running. However for large projects where you may be working in a team,or needs to be maintained, you should use c#. The strong typing prevents bugs from forming and helps greatly for self documenting code.

  • @Lgansito
    @Lgansito 5 лет назад

    very nice, could you do a video about directories and sets??

  • @tatthetabernacle7443
    @tatthetabernacle7443 3 года назад

    This was helpful thank you.

  • @my_studies2888
    @my_studies2888 5 лет назад +1

    Hi brother could you do arguments / parameters next ? In c#?

  • @edwardwilliamsams6589
    @edwardwilliamsams6589 5 лет назад

    Awesome content; subbed.

  • @daedricknightt9219
    @daedricknightt9219 4 года назад

    Thanks very much. Very informative

  • @AlexisPAUTROT
    @AlexisPAUTROT 4 года назад

    With the use of dynamic feature (C# 4.0) you can write doit = true; and then doit = 1234; I have implemented such an object and I'm able to write the following:
    var doit = new DynamicStruct(); // DynamicStruct is my implementation (~150 lines of code) that uses dynamic feature introduced in C# 4.0
    doit = true;
    doit = false;
    doit.whatever = 1234; // no need to declare "whatever", just write the assignation, it will be created on the fly
    doit.whatever.anotherVariable = new List();
    doit.a_new_var_when_I_want = doit.whatever;
    When looking at comparisons between C# and Python over the Internet, because they are not made thoroughly, all of them are pretty much the same incomplete and deceptive consensus.

  • @roadtoonesubscriber4151
    @roadtoonesubscriber4151 3 года назад

    I know c# and I wanted to make some bots and programs with automation and I see most of them are made with python. Is it only because it s simpler or there is a specific reason why I should use python and other progr languag for bots and automation?

  • @MIL3SHIGHCLUB
    @MIL3SHIGHCLUB 4 года назад

    But how do I open a file and use python, it just shows 4 small bars where it should show the python symbol.

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

    I was blown away by the content, went to subscribe and was even more blown away not to see you eating food on screeen!!!

  • @JR-hg1lo
    @JR-hg1lo 5 лет назад

    @Jabrils what laptop do you use homie?

    • @pol1315
      @pol1315 5 лет назад

      J R razor 1440hz 5k Qled display 50” Macbook retina display infinity U screen intel dualcore f240 qualcomm snapdragon 775 A12 Bionic Chip

  • @chigozirimifebi4884
    @chigozirimifebi4884 4 года назад

    Whenever I run the code, my output says "'python' is not recognized as an internal or external command,
    operable program or batch file." I've tried going into Adanced System Settings on my computer to change the Path, but it still shows the same output. Can anyone help me with this problem?

  • @iRogerRomero
    @iRogerRomero 3 года назад +3

    Wish I found this 10 years earlier but it’s never too late

  • @timochyfilix5176
    @timochyfilix5176 3 года назад +1

    have you mentioned that compiled language is faster and more robust for error detection?

  • @karolg631
    @karolg631 4 года назад +1

    You could use :
    var something = true;
    var something1 = 1337;
    var something2 = new List();
    also if that's not enough for you and you want to feel the snake language even more, you can play with the "dynamic" in C# :)

  • @dragon-xt4vw
    @dragon-xt4vw 5 лет назад

    These are really good. He should really do tutorials on neural networks at some point. I feel like he'd be able to explain it well.

    • @dragon-xt4vw
      @dragon-xt4vw 5 лет назад

      It just occurred to me that my comment is a bit absurd. Not unrealistic, but absurd. Here's an analogy to make my point:
      Kind person: Makes videos online about basic electronic circuits. Resistors, Voltage, etc.
      Me: Please teach us how to make integrated circuits.

  • @buddyroach
    @buddyroach 3 года назад

    so how does python handle memory when not setting dimensions for them variable and then assigning a variable of one type to another?

  • @jameskywd
    @jameskywd 5 лет назад

    Love your vids!

  • @brandonda8165
    @brandonda8165 5 лет назад +1

    I have installed windows studio code. I am running python and code runner. Whenever I hit the play button I get back
    'python' is not recognized as an internal or external command,
    operable program or batch file.
    what do I do??

    • @fgbeast5805
      @fgbeast5805 5 лет назад

      You have to install python into your computer.

    • @fgbeast5805
      @fgbeast5805 5 лет назад

      Brandon Da here brother, ruclips.net/video/dX2-V2BocqQ/видео.html
      I hope this helps.

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

    I learned C# in school to make videogames through Unity and now that I have entered university I'm going to be taught python which feels like a simpler version of C# to me.
    I don't know why it's this way but it is what it is

  • @pltxpltx7996
    @pltxpltx7996 5 лет назад

    Great, thank you.

  • @MrPicklepod
    @MrPicklepod 5 лет назад +1

    This is amazing

  • @Birdmanondaweb
    @Birdmanondaweb 5 лет назад +4

    'python' is not recognized as an internal or external command,
    operable program or batch file.
    This is what I get when I do the print(doit) command just like you did with the doit = True set up just the same. I reinstalled it, ran the language as Python, and the interpreter as Python, and still it won't work. I'm not sure what I'm doing wrong.

    • @BiancaAguglia
      @BiancaAguglia 5 лет назад +6

      Do you know if Python was added to the PATH when you downloaded it? If not, you have to manually add it. Or you can uninstall Python and re-download it, but make sure you check the "Add Python 3.7 to PATH' button. I believe it's on the first screen you see when you start installing Python. Good luck! 😊

    • @GeorgeRRFloyd
      @GeorgeRRFloyd 5 лет назад

      I had this problem too: first go to windows search bar and search "path", click "edit the system environment variables", on the pop-up click "environment variables", on the new pop-up find "Path" on the list, select it and click edit, click "new" and paste the path of Python (mine was C:\Users\[YOURUSERNAME]\AppData\Local\Programs\Python\Python37-32). Then just restart computer and it should work.

    • @HaloWolf102
      @HaloWolf102 4 года назад

      @@GeorgeRRFloyd I tried this, doesn't work. My terminal keeps abruptly shutting off and gives me the error 'The terminal process command 'C:\Windows\system32\cmd.exe' failed to launch (exit code: {2})'

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

    Was Python 3.6 the latest version of Python available in 2019? And how can I transfer this knowledge to the later versions of Python? I have Python 3.8 and Python 3.10 downloaded on my computer. Should I even try to transfer this knowledge to the later versions of Python? 3.6 looks and behaves differently than the Python versions that I have downloaded.

  • @Po1aris100
    @Po1aris100 4 года назад

    I don’t know much about C#, but I do know that in python every block of code doesn’t have its own scope. Scopes are defined for the Module, Classes and Functions. An if, while, for, with, try...etc block can initialize a variable assuming that block is evaluated.

  • @jaymaas5114
    @jaymaas5114 5 лет назад +3

    Jabrils,
    Just finished watching your first four videos. Enjoying your content. I am attending Lambda School for Full Stack Web, but really would like to get a head start on Python and C#. I am also fascinated with Data Science and Machine Learning and enjoyed your other videos on those as well. I can say that after 11 weeks of full time schooling so far, that I still picked quite a bit up from the first 4 videos. Really interesting how C# and Python compare. I have been using mostly JavaScript, object orientated programming is familiar for me.
    What I enjoyed the most about your videos so far-
    Your content matches up with those you've done before, so A+
    Teaching C# and Python side by side was a great experience
    Length of videos
    Where I think you should concentrate-
    Scripting your videos to have the biggest impact, you could really capitalize on keeping the same length for your videos and increasing the amount of depth at certain points (i.e. explaining an assignment operator, default lines inside of C#)
    The C# screen's font size could be larger, the = is pretty blurred
    Spend maybe just a bit more time on how to set up a fresh app for both C# and Python. Maybe just a quick revisit at the beginning of video #4
    Can't wait to make my first program with the next tutorial! I will try and leave some more comments for you. Very excited that I decided to follow you on twitter. I have been watching your channels page like a hawk for new content.

    • @BiancaAguglia
      @BiancaAguglia 5 лет назад +2

      Best wishes with the Lambda school program. 😊 Was it hard to get accepted?

    • @jaymaas5114
      @jaymaas5114 5 лет назад +1

      @@BiancaAgugliaIt takes some work for sure if you do not have a background in it like me. If you are interested definitely get in contact with them! I love it

    • @BiancaAguglia
      @BiancaAguglia 5 лет назад

      @@jaymaas5114 Thank you. I'll contact them. 😊

  • @abboss.b9935
    @abboss.b9935 4 года назад +13

    5:40 use "dynamic" for dynamic types

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

      Thanks for the timestamp, I read criticism from other coders, and I couldn't seem to 'find' what they were talking about.

    • @r1pfake521
      @r1pfake521 3 года назад

      Yes it's possible but you shouldn't use it for "normal" code, dynamic was made for special cases like COM APIs etc

  • @ArivanAshstar
    @ArivanAshstar 5 лет назад +6

    This is really good for helping people who got taught python, how to move to C#

  • @techslugz
    @techslugz 3 года назад

    See at about 16:44 with the int a variable = 5 and = 0 on both C# and Python windows in the if statement..
    as the variable is last changed to zero, if you were to print(a)/Console.WriteLine(a) would a have the value 5 or 0? Because it is changed in the if statement, would it revert to its original declared value outside of that if statement code block? Or would it stay as what it is changed to within the if statement code block? I feel like it will be 0 but Im not too sure so if anyone knows the answer itd be appreciated :-) cheers in advance.

    • @Jabrils
      @Jabrils  3 года назад

      the variable is only last changed to 0 IF doit = True. if doit = False, then that entire code block is ignored, its like it never existed, thus, a = 5 still.

  • @jayxofficial5126
    @jayxofficial5126 4 года назад

    Bro you should do more of these

  • @guillermoolivan2297
    @guillermoolivan2297 3 года назад

    Does the ide matter?
    Can I program games in Unity using C# in VScode?

  • @lefonddruelle7694
    @lefonddruelle7694 3 года назад +12

    Alternative title: Whats the difference between a dog and a cat

  • @nielhaasbroek3681
    @nielhaasbroek3681 4 года назад

    Hi, do you think JavaScript is good for a beginning?

  • @vxsniffer
    @vxsniffer 4 года назад

    actually you can use semicolons in Python as well... below example of working code:
    if True: a = 1; b = 2; c = 3
    print(a, b, c)
    ...but nobody code this way (maybe except former C# devs) as lowering readability

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

      he mentioned that in 8:46

  • @vishalsrivastav5071
    @vishalsrivastav5071 5 лет назад

    Which IDE would you suggest for Machine learning using Python?

    • @vishalsrivastav5071
      @vishalsrivastav5071 5 лет назад

      @ProfesorYT I'll surely check pycharm out. Hope it meets my requirements, Thanks. 🙂

  • @moyk3517
    @moyk3517 5 лет назад

    Why does it show the wrong number in the output if I change the variables. (For example, i changed the a = 5 in the video into a = 7 and it still showed 5). I can fix this by debugging but do I really need to do that every time? newbie here.

    • @fgbeast5805
      @fgbeast5805 5 лет назад

      Moyk Sus102 it sounds to me like u did not save the file before running the code.

  • @xxgn
    @xxgn 3 года назад

    In C#9, the below is a legal program (i.e., no need for a class declaration or a main function):
    System.Console.WriteLine ("Hello, world");

  • @pyraxus
    @pyraxus 5 лет назад +25

    Jabrils, your truly great, especially for spending your time on teaching us bool thank you = true;

    • @iLinked
      @iLinked 4 года назад +1

      yikes

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

      Unexpected token 'you'

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

    Yeah Umm having loosely typed variables can be a HUGE problem when it comes to introducing bugs into your program while also introducing hard to debug errors and unwanted behaviors! It's like we haven't learned anything in these last 30+ years! It's like Javascript in a way!
    Thanks, but I'll stick with the easily debuggable, maintainable, and predictable behavior code of C#!!

  • @nickareekadan7313
    @nickareekadan7313 5 лет назад +1

    Might be a dumb question but didn't you set the variable "doit" = to False the second time so wouldn't the logic of the if statement be...
    doit = False
    Print ('checking...')
    if doit ( which is now = to False):
    doit = False
    Print("blah")
    Shouldn't it print the if statement because doit is equal to False? I think I'm just confused..

    • @BiancaAguglia
      @BiancaAguglia 5 лет назад +1

      if doit actually means if doit == True
      (Also, keep in mind that doit = False means you assign the value 'False" to the variable doit, whereas doit == False means you're checking if variable doit is 'False. That can be a bit confusing when you first learn Python. )
      If you want to understand this better, try the code the following three ways:
      1.
      doit = False
      Print ('checking...')
      if doit:
      doit = False
      Print("blah")
      2.
      doit = False
      Print ('checking...')
      if doit == True:
      doit = False
      Print("blah")
      3.
      doit = False
      Print ('checking...')
      if doit == False:
      doit = False
      Print("blah")
      You'll see that ways no. 1 and no. 2 work the same. Way no. 3 prints out 'blah'. 😊 (You don't have to use doit = False inside the if blocks, but I left it there to match the code we started with.)

    • @nickareekadan7313
      @nickareekadan7313 5 лет назад +1

      @@BiancaAguglia this actually helped my brain so much haha thank you!

    • @BiancaAguglia
      @BiancaAguglia 5 лет назад

      @@nickareekadan7313 Very glad to hear that. 😊

    • @Anon-te2bz
      @Anon-te2bz 5 лет назад

      @@nickareekadan7313 Or you can put it this way, double equal sign, or " == " means "equal", which is used to check something. While a single equal sign, or " = " is to assign data types. As a newbie myself, I made the same mistake thinking that " = " means equal to.

  • @mastershooter64
    @mastershooter64 3 года назад +31

    pfft.. you guys use high-level languages? what are you 3 years old?
    real men use machine language

    • @sudoShiba
      @sudoShiba 3 года назад +3

      Depends what you use your code for

    • @mastershooter64
      @mastershooter64 3 года назад +6

      @@sudoShiba yea it does, but that was a joke

    • @nimphilia
      @nimphilia 3 года назад +4

      use magnet

    • @hgbtheman
      @hgbtheman 3 года назад +6

      real men simply become computers and become the code

    • @Tokagawa89
      @Tokagawa89 3 года назад +3

      Real men code in Binary and become machines.

  • @franciscomenjivar7099
    @franciscomenjivar7099 5 лет назад

    so when I click run for the python code, I get no output, like i get the running and done lines but nothing in between. How do I fix this?

    • @CatChrist
      @CatChrist 5 лет назад

      For anything to show in console, use print(variable_name) or print("Test!") in Python 3+

    • @franciscomenjivar7099
      @franciscomenjivar7099 5 лет назад

      Nvm I figured it out y'all, you have to save the script before pressing run

  • @Freakhealer
    @Freakhealer 3 года назад

    I start using c# because of unity but I now think python is a better language, is that accurate? Knowing both of them is there a reason other than unity to keep using c# over python?

  • @splatbot8091
    @splatbot8091 5 лет назад +8

    Why make these videos unlisted?

    • @styxnstones98
      @styxnstones98 5 лет назад +1

      That way people who are not interested aren't spammed on there recommend and doesn't clog up his video archive

    • @godlyvex5543
      @godlyvex5543 5 лет назад

      The video was just uploaded today

  • @NickTheHunter
    @NickTheHunter 4 года назад +1

    15:00 - the “a” variable was not declared because your “doit” variable is assigned to be false, I guess. Is not this the only reason for the error?!

    • @crucifixxx4960
      @crucifixxx4960 3 года назад

      That's true, but it will show the error anyway. The variable can't be used because its inside the block, which the code technically can't "read" outside the block. If you specifically set the variable to global then it would work.

  • @darshmostafa6044
    @darshmostafa6044 3 года назад

    I am a Beginner and i want to learn web what's the best (Php Laraval 8 or python Django or Java spring or C# . Net Core5),.....

  • @lucaswalker6919
    @lucaswalker6919 3 года назад +1

    C# in my opinion is easier to code with as it's more structured and less concise, so you can actually tell what types variables are and what functions do.

  • @lythd
    @lythd 5 лет назад +2

    This is the first video I've seen from you and I want to say that this was a very good video. I am a java developer but I'm looking for another language (just so i can more easily relate to other developers). I've coded a tiny bit in python and I was wondering if I should switch to C# and this video was very informative thank you!
    The only thing was that you used casting incorrectly, casting is changing a data type to another data type, an easy example would be an int to a float or vice versa, so like the random function (at least in java) returns a float but let's say you want to use an int you could cast it using *int random = (int) Math.random();* what you meant to say was just declaring the type. However since casting works the same way in C# vs Python (as far as I understand that might be wrong) I don't have a problem with it.
    Great video tho, I subbed and I can't wait to watch more of your videos!

    • @Christobanistan
      @Christobanistan 2 года назад +2

      Just to entice you over to C#, you can write a condition like so:
      if (a is < 4 and < 0) { ... }
      Really. It's pattern matching is pretty great.

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

      @@Christobanistan thank you, this was a while ago and i use c# quite a bit

  • @SushiEater44
    @SushiEater44 5 лет назад

    Great Video! But is Python even useful if I wanna (e.g.) Code Games or Applications (desktop applications)?

    • @MrPicklepod
      @MrPicklepod 5 лет назад

      Pythons pretty slow for things like games but can be pretty powerful in making applications that dont need to to be fast.

    • @SVVV97
      @SVVV97 5 лет назад

      Yes immensly. It's WAY faster to develop with and most code isn't that limited by speed. And if it is you can always jit compile python (Like C# does) or extend it with a faster language like C, Rust, C#, Java etc.

  • @johnnyblack612
    @johnnyblack612 3 года назад

    Please make a video exploring TEMPLE OS, the divine operative system 🙏

  • @HaloWolf102
    @HaloWolf102 4 года назад

    From age 16-18, I've tried learning C++ through Udemy, whatever from Khan Academy, and whatever from Arduino. I failed all of them, yes even the kid learning one.
    In each instance I've failed to correctly understand if statements, but now I do.
    I thought whatever was in the if statement, was opposite of what it needs to run, example.
    **** //Correct
    bool doit = true;
    if (doit) //In order for this to run, you need doit to equal true.
    {
    doit = false;
    }
    ****
    But when I tried it the opposite way
    **** // Incorrect
    bool doit = false;
    if (doit) //In order for this to run, you need doit to equal false.
    {
    doit = true;
    }
    ****
    But now I realize, when I'm almost 21, 5 years later, that for an if statement to work, it always needs it to be true, and not the opposite of what it contains, at least in a boolean sense.

  • @sonnybrown4758
    @sonnybrown4758 4 года назад

    Thank you so much

  • @hyperpopboy
    @hyperpopboy 5 лет назад

    make one of these for javascript and python