#18 Python Tutorial for Beginners | User input in Python | Command Line Input

Поделиться
HTML-код
  • Опубликовано: 28 сен 2024
  • Check out our courses:
    Spring Framework 8 Full-Day Course Live: go.telusko.com...
    Coupon: TELUSKO10 (10% Discount)
    Enterprise Java Spring Microservices: go.telusko.com...
    Coupon: TELUSKO10 (10% Discount)
    Master Java Spring Development : go.telusko.com...
    Coupon: TELUSKO20 (20% Discount)
    Udemy Courses:
    Spring: go.telusko.com...
    Java:- go.telusko.com...
    Java Spring:- go.telusko.com...
    Java For Programmers:- go.telusko.com...
    Python : go.telusko.com...
    Git : go.telusko.com...
    Docker : go.telusko.com...
    For More Queries WhatsApp or Call on : +919008963671
    website : courses.telusk...
    Instagram : / navinreddyofficial
    Linkedin : / navinreddy20
    TELUSKO Android App : bit.ly/TeluskoApp
    In this lecture we are discussing about:
    - How to get user input
    - input function
    - printing input message
    - Type of input data
    - When to use index value
    - eval function
    - Passing values from command line
    - Argument line input
    #1 How to get user input
    -- Getting user input in Python is straightforward. You can use the input() function
    to get input from the user. The input function takes a single argument, which is the
    prompt message displayed to the user.
    e.g
    name = input("Please enter your name: ")
    x=input("Enter first number: ");
    y=input("Enter second number: ");
    z=x+y;
    print(z);
    #2 input function
    -- In Python, the input() function is used to accept user input from the command line or console.
    name=input("Enter your name:");
    print(name);
    -- In this example, the input() function prompts the user to enter their name. Whatever the user types
    in response is stored in the name variable.
    -- Note that the input() function always returns a string, so if we want to use the user's input as a number,
    we'll need to convert it using the appropriate type-casting function (e.g., int() for integers or float() for
    floating-point numbers).
    #3 Types of input data
    -- The input() function always returns a string, regardless of what the user enters.
    we may need to convert the input to a different data type if you want to perform calculations or other operations on it.
    e.g
    x=input("Enter first number: ");
    a=int(x);
    the input entered by the user is converted to an integer using the int() function in this example.
    #4 when to use index value
    -- If you want to get a single character from the user, we can use the input() function and index the result.
    e.g
    ch=input('enter a character: ');
    print(ch[0])
    ch=input('enter a character: ')[0];
    print(ch);
    #5 eval function
    eval function
    -- The eval() function in Python is used to evaluate an expression entered by the user as a string.
    The eval() function returns the result of the expression as a value.
    e.g
    x=eval(input("Enter an expression: "));
    typeOf = type(x);
    print(typeOf);
    #6
    Passing values from command line
    -- sys module provides access to any command-line arguments via the sys.argv list.
    we can pass arguments to a Python script from the command line using the sys.argv list.
    The first argument in the list is always the name of the script itself.
    suppose we have a file named Mycode.py
    in file we have written code
    import sys # without this line you will get error
    x=sys.argv[1];
    y=sys.argv[2];
    z=x+y;
    print(z);
    in command line we have to run this file
    #python3 Mycode.py 9 5
    0 1 2
    Note: Mycode is count as 0th argument
    9 is count as 1st argument
    5 is count as 2nd argument
    Github :- github.com/nav...
    Python for Beginners :- bit.ly/3JOLQhl
    Editing Monitors :
    amzn.to/2RfKWgL
    amzn.to/2Q665JW
    amzn.to/2OUP21a.
    Java:- bit.ly/JavaUde...
    Spring:- bit.ly/SpringU...
    More Learning :
    Java :- bit.ly/3x6rr0N
    Python :- bit.ly/3GRc7JX
    Django :- bit.ly/3MmoJK6
    JavaScript :- bit.ly/3tiAlHo
    Node JS :- bit.ly/3GT4liq
    Rest Api :-bit.ly/3MjhZwt
    Servlet :- bit.ly/3Q7eA7k
    Spring Framework :- bit.ly/3xi7buh
    Design Patterns in Java :- bit.ly/3MocXiq
    Docker :- bit.ly/3xjWzLA
    Blockchain Tutorial :- bit.ly/3NSbOkc
    Corda Tutorial:- bit.ly/3thbUKa
    Hyperledger Fabric :- bit.ly/38RZCRB
    NoSQL Tutorial :- bit.ly/3aJpRuc
    Mysql Tutorial :- bit.ly/3thpr4L
    Data Structures using Java :- bit.ly/3MuJa7S
    Git Tutorial :- bit.ly/3NXyCPu
    Donation:
    PayPal Id : navinreddy20
    www.telusko.com

Комментарии • 1,2 тыс.

  • @lijeshjosy5616
    @lijeshjosy5616 5 лет назад +807

    The way you making mistakes intentionally and correcting is the best of this videos which makes best way of learning.. learning from mistakes

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

      yeah that;s right
      He's awesome

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

      chup .chal nikal,phli fursat

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

      @@anshukumar3928 sahi hai bancho

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

      It reminds me of the time front benchers would teach us on the exam day.

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

      Best teacher❤️❤️

  • @raulferreira4925
    @raulferreira4925 5 лет назад +254

    Ok ok I don't speak English very well, but I understood more you video than other videos Spanish🙆‍♂️ thank's

  • @flyingbirds4235
    @flyingbirds4235 6 лет назад +16

    Sir, You Are The Best. I never had the intention to learn Python but because of your lectures and motivation videos, I started learning.

  • @om7289
    @om7289 4 года назад +51

    Homework done....you are teaching awesome better than the paid courses 😊🙏🙏
    x = int(input ("no."))
    z = x**3
    Print (z)

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

      @@meetsakhareliya755 video k end mein dekho red colour k box mein hota hai

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

      Why do you have ther “no”? Thats string not int😅😅
      (I think its joke)

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

      Thank you

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

      x= int(input('enter 1st number'))
      print(x**3)

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

      Can we write this using less line buddy?

  • @mayankthakur5927
    @mayankthakur5927 2 года назад +25

    1. For Pycharm
    x = int(input("Enter a number:"))
    y = x*x*x
    print("The cube of the number is ",y)
    2. For Command Line
    import sys
    x = int(sys.argv[1])
    y = x*x*x
    print("The cube of the number is ",y)

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

    4 godziny wykladów nie dadzą tyle co 5 minut sluchania tego gościa, uwielbiam go

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

    you are a great teacher bro, keep it up! look forward to learning programming under your guidance!
    a=you're
    b=great
    print (a + b)

    • @rohankiratsata1161
      @rohankiratsata1161 5 лет назад +14

      There is a mistake bro...
      If Want to Store Any Sentence or Anything Character then It Should Be in quotes (type is String)
      Like this: a = "Hello"
      b="How r u"
      Print(a+b)...

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

      @@rohankiratsata1161 also, it would print HelloHow r u so you need to add space after hello

  • @AKHAN-no1bz
    @AKHAN-no1bz 2 года назад +1

    The fact that you get errors and correct them right after by showing us... thats what i call teaching and learning. 👏👏👏👏

  • @AshokKumar-mk1nr
    @AshokKumar-mk1nr 4 года назад +7

    Really, It's very interesting.... the way you carry the session is awesome.. intentionally you did mistake and rectify it, that is experience.... really its very useful
    .

  • @mrlokeshkumar76
    @mrlokeshkumar76 3 года назад +7

    no = int(input("enter the number"))
    print(no ** 3)
    on command line- import sys
    x = int(sys.argv[1])
    print(x ** 3)

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

      can we use print(math. pow(x,3) in both Pycharm as well as in the Command Line?

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

    That last 'agrv' by importing from sys module is amazing :-)

  • @creativityunleashed9101
    @creativityunleashed9101 5 лет назад +10

    ------command line-----
    import sys
    x = int(sys.argv[1])
    y = x ** 3
    print(y)

    • @AKHIL.438
      @AKHIL.438 3 месяца назад

      It's showing eof error how can I overcome it please reply 😢😢😢😢😢😅😢😢😢

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

    print("Fnding cube of a number ")
    import sys
    x=int(sys.argv[1])
    y=x**3
    print(y)
    is the answer for the assignment
    I am enjoying watching these series, thankyou navin sir

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

    a=int(input("enter a number"))**3
    Print(a)

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

      from math import pow
      x=int(input('Enter the Number'))
      y=pow(x,3)
      print(y)

  • @freakmania2771
    @freakmania2771 4 года назад +105

    Print(“you are best teacher your python love you 3000”)

    • @rajatrawat4284
      @rajatrawat4284 4 года назад +43

      NameError: 'Print' is not defined
      😂
      'P' should be of lower case bro..!

    • @o-p-bgaming1274
      @o-p-bgaming1274 4 года назад +1

      @@rajatrawat4284 😂

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

    By giving input in Command prompt Sir i cant able to do it by my own 🥲......rest things i understand and done that too...thnkuu

  • @arjundev8090
    @arjundev8090 3 года назад +10

    3:55
    Actually you could add int function before input function .. thats saves your time
    Like
    X=int(input("Enter 1st number"))
    Y=int(input("Enter 2nd Number"))
    Then you directly run the code and input the numbers and get the answers.
    And you don't have to add Another line of A & B and all..
    I hope this helps

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

      Yeah he actually mentioned that in this video.

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

      @@omkarjsuvarna i think he didn't watch the full video before commenting this ...

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

    thank u so much sir..sir we want lecturers like u in our college..sir i have seen many videos regarding python but i was not able to write any code for given program..one of my friend suggested me to learn python from your channel and it really helped me a lot..the way of ur teaching is really awesome..thanks sir once again

    • @ManuKumar-rf5gb
      @ManuKumar-rf5gb 2 года назад +1

      name = input("what is your name?: ")
      age = int(input("how old are you?: "))
      age = age + 1
      print("Hello "+name)
      print("you are "+str(age)+" years old") why here give str plz explain

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

      @@ManuKumar-rf5gb int type we cannot concatenate with str, so you need to change data type into str and concatenate with + 🙂

    • @ManuKumar-rf5gb
      @ManuKumar-rf5gb Год назад

      @@uday2159 tq 😊

  • @RiyasMohammed-ib9jy
    @RiyasMohammed-ib9jy 5 лет назад +10

    yas=int(input("enter my number"))
    X=yas ** 3
    Print(X)

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

    Thank you for this. I was training with the 100 days to code challenge and was stuck on a problem that I needed to solve, and this helped me to find the solution. Funny thing, I accidently hit submit before the test, and it worked.

  • @pavanmudhole2065
    @pavanmudhole2065 5 лет назад +14

    from sys import argv
    x=int(argv[1])
    y=x**3
    print(y)

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

    Reddy garu mee teaching mindblowing Anthe 👏👏

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

    x=int(input('Enter a number'))
    z=pow(x,3)
    print('The cube of'+" " +str(x)+" "+'is'+" "+str(z))

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

      Yeah it is working even we are not importing math function

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

    Thanks Anna..they way u tech is very special....
    By the end of python course I have to learn 2 things one is python and second is the way u teach 😃 ..
    Of course it's impossible to get second but I will try🤘😆

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

    import math
    a=int(input('enter a number'))
    b=math.pow(a,3)
    print(b)

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

      It should be
      a = float (input ("enter your number ")
      Right?

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

      @@roopa6975 yes u can but the input must be float

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

      @@akhileshchanda4828 my quest is if you define it as int, then what should be the output if you enter a float value like 2.3? It won't give you a result. But if you define it as float, the input can be integer or a floating value. It gives output for both.

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

    1:56 the way he teaches from here 🖤

  • @vinodkumar283
    @vinodkumar283 3 года назад +66

    Man, the way you explain... Thats how a teacher should be. Thank you so much for all the treasures you create.

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

    I really had to pause the video and appreciate your teaching methods.

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

    Hello sir. Since your teaching method and knowledge is outstanding, I wanted to let you know that not only I am learning via your methodology and have already subscribed to your channel but I also suggested your tutorials to my brother. Your are an angel. Best regards.🙏🙏🙏

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

    to make a mistake and solve this problem step by step is the best teaching method for me not only for me but also for all watchings.thank u

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

    0:07 I like this moment too much

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

    Hello navin as for the quiz, this’s what I did and it worked
    1. d = int(input(“enter the number to be squared ”))
    2. f = d**3
    3. print(f)

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

    Amazing. I normally dont add comments on youtube videos. But the way you explain and teach is amazing. Thank you for all the learning you are imparting. Please keep up the good work. This channel for python is really helpful.

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

    print("just love it")

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

    Learning From The Mistakes Is Nice Bro

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

    I have many doubts I'm started python course your video 🔥🔥🔥 completely understand 👍👍

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

    x = int(input("Enter a number you want cube of"))
    y = x**3
    print(y)

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

    This python video is still the best i have watched on youtube. kudos

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

    For first problem its so easy you can use
    ---------
    X = input("write 1st number")
    Y = input("write 2st number")
    print(x+y)
    ---------------
    Its actually worked 😊😊

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

    Ever since I started working almost three years ago, I felt my passion for programming started dying because in one's job programming is not really done the way we all want to, you generally need to copy paste your code without applying any thinking to it which makes this boring. The very passion which made opt for software development was dying until I found out Navin sir's playlist. My curiosity and passion is back. This is oxygen.

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

    I was waiting to use an IDE but didn't know how to. but you are my night in a shinin' armor teacher and you taught me how to! thanks, sir!

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

    Another great efforts to get python in PyCharm,watching in Aug2020 and believe for Python this IDE is HOT HOT HOT...Well done job Mr Naveen

  • @SantoshSahu-nd1bw
    @SantoshSahu-nd1bw 6 лет назад +10

    using input: -
    print(int(input("Enter no to find cube: "))**3)
    using the command line:-
    import sys
    print((int(sys.argv[1]))**3)

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

    import sys
    x = int(sys.argv[1])
    Traceback (most recent call last):
    File "", line 1, in
    x = int(sys.argv[1])
    IndexError: list index out of range

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

      Arguments command line nunchi isthunnam kabatti akkadi nunche rtun cheyali

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

    You are also a comedian! Keeps it still interesting. You are a great teacher.

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

    In Pycharm
    import math as m
    a = int(input("Enter a Number to Find its Cube
    "))
    print("The Cube of ",a,"is",(m.pow(a,3)))
    I dont have my laptop with me now so I will add the cmd quiz after some time

  • @SanjeetKumar-eg8xf
    @SanjeetKumar-eg8xf 3 года назад

    Best teacher i have ever met. Thanks a lot sir.

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

    Ur explanation way is super sir....im understanding very easily

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

    you are so good at explaining , not irritating like others

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

    I love your fun style of teaching, I am learning as well as enjoying.💕💕💕💕

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

    1st method:
    x=int(input("Enter a number: ")
    y=x**3
    print(y)
    2nd method:
    from math import *
    x=float(input("Enter a number"))
    y=pow(x,3)
    print(y)

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

    Man, what a great video. The way you are teaching the concept is too good. Explaining each and every step. Thank you for the wonderful video.

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

    """
    x = input ('first')
    (1)
    y = input('second')
    (2)
    z = x + y
    print (z)
    return 12
    """
    x = int(input('first'))
    (1)
    y = int(input('second'))
    (2)
    z = x + y
    print (z)
    # return 3
    I just started the session and it like an addiction to learn. You are a champ. Sessions are so good & interactive.
    Thanks a lot.
    name='Navin Reddy'
    FeelingNow='nosire'
    print('thank you' ,name, FeelingNow[2:5])

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

    Best channel for learning programming.😊

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

    sticking to this channel for coding knowledge...awesome teacher

  • @JAM-zr6ss
    @JAM-zr6ss 4 года назад +1

    num1=input("enter number:")
    num2=input("enter another number:")
    result=float(num1)+float(num2)
    print(result)
    #used float to add even a decimal number

  • @516deepak
    @516deepak 5 лет назад

    Navin your humor while session is good with special effect . Great way of interaction

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

    number = int(input('Enter a number'))
    cube = number**3
    print(cube)
    ----------
    i got help from google actually ,but i learned smth and that is important

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

    4:16 you can also write
    x = int(input("enter 1st number"))
    to save ur time while coding
    hope it helped

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

    It worked in my case, at the very first try! I had 14... or maybe the new update.
    x = input("Enter 1st number: ")
    y = input("Enter 2nd number: ")
    z = x + y
    print(z)

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

    This man is truly an amazing teacher.

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

    superb sir i love the way you are teaching thank u very much

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

    import math
    x=int(input("enter cube number")
    x=math.pow(x,3)
    print(x)

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

    from math import pow
    x=int(input("enter the number to bo cube"))
    y=int(pow(x,3))
    print(y)

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

    the best way to get in understand . its really very helpful with each and every detail -

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

    def cube(x):
    return x * x * x
    n = int(input(" Enter the number : "))
    cube1 = cube(n)
    print("The Cube of {0} = {1}". format(n, cube1))

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

    Super Teaching Anna...
    Masthhh cheptunav Keka
    Telugu Bhai♥️🧡

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

    import math
    x = int(input('enter the base'))
    y = int(input('enter the power'))
    z = pow(x,y)
    print(z)
    this is working for me

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

    awesome presentation ,will surely contribute soon , keep doing good work

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

    Like we want addition of all number so instead of int will take float it will add decimal values too

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

    x = int(input("Enter a Number:"))
    z = x ** 3
    print(z)
    print(x,"'s cube is",z)

  • @priyankapungaonkar5363
    @priyankapungaonkar5363 6 лет назад +2

    i=int(input("Enter number:"))
    a=i**3
    print("Cube of number is {} ".format(a))

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

      Why did you used. format in print

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

    Navin, the way you teach is simply awesome!

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

    Hey you are telugu, right? Telusko means "know" In telugu

  • @PradipKumar-yw9tx
    @PradipKumar-yw9tx 11 месяцев назад

    def cube(x):
    return x*x*x
    n=int(input('enter a number'))
    print("The cube of", n, "is", cube(n))

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

    Just subscribed, you're a great teacher. This helped me so much on my project. Thank you!!!

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

    Can I use jupyter notebook or spyder instead of pycharm

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

    3:04 it is most important basic point which will be questioned in interviews..
    once interviewer asked about it and without proper idea i said it is taking integer type 😂 but later i searched and finds it defaultly takes String type that's why we use a = int(input(" first num "))

  • @vrowmuria
    @vrowmuria 6 лет назад +1

    You are awesome. Very helpful videos. Clear and concise. Thanks a lot!

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

    Great
    Type of teaching is awesome and great
    Impressive

  • @saiteja-td4uc
    @saiteja-td4uc 4 года назад

    Cube of a number
    from math import pow
    x=int(input("enter a number "))
    z=pow(x,3)
    print(z)

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

    Ans for question
    import math
    x=int(input('enter the value'))
    y=math.pow(x,3)
    print(y)
    Sir pls tell me it is correct or not

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

      i think its correct.....i tried this way.
      a=int(input('enter the number here'))
      b=int(a**3)
      print(b)

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

    I am impressed sir u have a lot of knowledge about python

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

    using the command line (cmd) using the input (pycharm)
    import sys
    x=int(input('enter a number')
    x=int(sys.argv[1])
    import math
    import math
    y=math.pow(x,3) (or) y=(x**3) (no need for importing math if y=x**3)
    z=math.pow(x,3)
    print (int(y))
    print (float(z))

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

    You, sir are an excellent teacher! I love your energy.

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

    I am impressed. I have watched 3 of your videos today for the first time and what I haven't been understanding about introduction to python is sinking in better. Thank you sir.

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

    Thank you Sir.

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

    for pycharm -
    import math
    x=int(input("enter a number")
    result=math.pow(x,3)
    print(result)
    for cli
    import sys
    import math
    x=int(sys.argv[1])
    result=math.pow(x,3)
    print(result)

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

    hey man i love you navin reddy. you are fantastic guy loved your way of explanation and i link if it is not work then i closed the video.. kudos goes to you man

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

    x=int(input("enter the number"))
    y=pow(x, 3)
    print(y)

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

    assignment
    import math as m
    n = int(input('enter the num'))
    print(m.pow(n, 3))
    on command line-
    import sys
    x = int(sys.argv[1])
    print(x ** 3)

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

    ans:
    1. using input()
    import math
    x = int(input("please enter a number: "))
    cube = int(math.pow(x, 3))
    print(cube)
    2. using command line
    import math, sys
    x = int(sys.argv[1])
    cube = int(math.pow(x, 3))
    print(cube)

  • @shrinidhir2294
    @shrinidhir2294 Месяц назад

    In Pycharm
    import math
    num=int(input('enter number to get the cube'))
    result=num.__pow__(3)
    print(result)

  • @ujjalsamanta5841
    @ujjalsamanta5841 6 лет назад

    ha ha don't stop video sir, your teaching style is aswome .

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

    Answer of the quiz
    import math as m
    x=int(input("Enter the number to find its cube: "))
    # It will take input from user in command prompt
    z=int(m.pow(x,3))
    # calculate cube of that number
    print(z)

  • @gauravkumar-vlogs
    @gauravkumar-vlogs 5 лет назад +1

    number = float(input(" Please Enter any numeric Value : "))
    cube = number * number * number
    print("The Cube of a Given Number {0} = {1}".format(number, cube))

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

      this one is good but for saving time:
      import math
      number=int(input("enter any number"))
      cube=pow(number,3)
      print(cube)

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

    print("Enter a Number:")
    x = int(input())
    print("The Cube of the ",x ,"is ",x*x*x)

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

    n=int(input("Enter a no.
    "))
    print(n*n*n)
    OR
    from math import pow
    n=int(input('enter a no'))
    c=pow(n,3)
    print (c)

  • @RV-pf7mt
    @RV-pf7mt Месяц назад

    x=int(input('enter a value'))
    import math
    z=math.pow(x,3)
    print("the cube root of the given number is:",z)

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

    One doubt if we are good and better using idle why using command prompt??