Showing posts with label user input in python. Show all posts
Showing posts with label user input in python. Show all posts

Jul 15, 2020

User Input in Python | Coding Winds

Python Input
Hello guys, we will learn about how user can have access to the inputs. 
In python 2.7, which is a bit older version, we use raw_input()
In python 3.0, which is currently used, we use input() 

Python 3.0
Lets try out an example,
Output


We also can specifically ask the user the type of input we need. Basically, the default code stores it as a string. We separately have to ask the user for the integral input. 
Look down for the explanation,

Check out the output and understand the difference.

Hello Python people, for this blog we have taken help from the book Python : The Complete Reference.

Hope all your doubts regarding this are clear now.

If you still have any doubt on this topic then do come to us via email "sophomoretechs@gmail.com" or via Instagram "@coding.winds".


Do subscribe to our daily blog update by clicking here.


Thank You!