You are currently viewing How To Make User Input Program In Python 3.8?
How To make User Input Program In Python

How To Make User Input Program In Python 3.8?

How to make user input program in python. Python is uses in every type of program development i.e web development, software development , machine programming , big data and data  science and mobile application development android and IOS. 

So in this lesson I will teach You How to make user input program in python using function with different data type. I will try to teach you this simple program with few easy step so you develop at home or class easily.This is a first step to develop a program in python.

You should focus in initial because in future you can develop a big program by following this.  In other computer programming languages their executable file extensions are .exe for example VB.NET, C++, C# , Visiual Fox Pro and VB6. But in python the executable file extension is .py.

How To Make User Input Program In Python | Using Max Function

In python there are  lot of built-in function the developer use these built-in function in there program to get the report. Here we use some built-in function (If you don’t the built-in function please read my previous article what is built-in function and how to use in python.)

Use Of Max Function

Step 01: Open your python IDLE.

Step 02: Select the new file in file menu. The new file will open like following pics.

Python Built Executable Program
Python Built Executable Program

Step 03 : Save your file with any name which you created.

Step 04: Enter the following code line in your new file and save it.

x= int(input (“Enter First Number :”))
y = int(input (“Enter 2nd Number :”))
z= int(input (“Enter 3rd Number :”))
print (“The Max Value Is :”, max (x,y,z))

Python Built Executable Program

Step 05 : After writing your code in the menu bar select the run menu then click on run module the program will run in IDLE Python.

Python Built Executable Program

After run module the IDLE execute the program and put the desired value in user input function which you created in your program. When your input will completed the program will show out result in last line like following pics.

Python Built Executable Program

In above example i put the three different number in input the program read the values and display me the max value. 

Used of Max Function In Python:

  • The max function use  to get the maximum stock from the product table. For example if you want to get the  maximum stock level from the all the product then you can use the max function..
  • The max function is use to get the highest salary from the employee table. The max function display the highest personal salary from the employee table.

Example:

Python Built Executable Program

How To Make User Input Program In Python | Get The Minimum Value From Input Function In Python;

The min function is use  to get the minimum value from the single variable , more than one variables and array list. Here we cover the all method to get the minimum value.

Create your another program save it with min value. Put the following code in your file and run the project.

Example :

x= int (input (“Please Enter First Number :”))
y= int (input (“Please Enter 2nd Number :”))
z= int (input (“Please Enter 3rd Number :”))
print (“The Minimum Value Is :”, min(x,y,z))

The Result is :

Python Built Executable Program

How To Make User Input Program In Python | Get The Minimum Value Using Array Method:

Example :

>>> x = [50,40,30,104, 90]
>>> print (“The Minimum Value Is :”, min (x))
The Minimum Value Is : 30
>>>

Python Built Executable Program

This Post Has One Comment

Comments are closed.