Python

K-Nearest Neighbors (KNN) in Python — step-by-step Python tutorial on Progressive Robot

K-Nearest Neighbors (KNN) in Python

URL: https://www.progressiverobot.com/k-nearest-neighbors-knn-in-python/ K-nearest neighbors (kNN) is a [supervised machine learning](/community/tutorials/supervised-machine-learning) technique that may be used to handle both classification and regression tasks. I regard KNN as an algorithm that originates from actual life. People tend to be impacted by the people around them. The Idea Behind K-Nearest Neighbours Algorithm Our behavior is shaped by the […]

Read more
Build and Deploy Your Personal Terminal ChatGPT Bot in Python with OpenAI APIs — step-by-step Python tutorial on Progressive Robot

Build and Deploy Your Personal Terminal ChatGPT Bot in Python with OpenAI APIs

URL: https://www.progressiverobot.com/openai-terminal-chatbot/ Introduction Conversational bots have become increasingly popular, providing an interactive way for users to engage with technology. OpenAI's "GPT" (Generative Pre-trained Transformer) models enable developers to create sophisticated conversational agents. In this tutorial, you will build and deploy your personal terminal ChatGPT bot using Python and OpenAI APIs on a cloud servers running […]

Read more
Python Classes and Objects — step-by-step Python tutorial on Progressive Robot

Python Classes and Objects

URL: https://www.progressiverobot.com/python-classes-objects/ Python is an object-oriented programming language. Python Classes and Objects are the core building blocks of Python programming language. Python Class By this time, all of you should have already learned about [Python Data Types](/community/tutorials/python-data-types). If you remember, basic data types in python refer to only one kind of data at a time. […]

Read more
Python - Get IP Address from Hostname — step-by-step Python tutorial on Progressive Robot

Python – Get IP Address from Hostname

URL: https://www.progressiverobot.com/python-get-ip-address-from-hostname/ [Python socket module](/community/tutorials/python-socket-programming-server-client) can be used to get the IP address from a hostname. The socket module is part of the Python core libraries, so we don't need to install it separately. Python Socket Module to Get IP Address from Hostname Python socket module gethostbyname() function accepts hostname argument and returns the IP […]

Read more
Python Modules — step-by-step Python tutorial on Progressive Robot

Python Modules

URL: https://www.progressiverobot.com/python-modules/ Python Module is essentially a python script file that can contain variables, functions, and classes. Python modules help us in organizing our code and then referencing them in other classes or python scripts. Python Modules A file containing Python definitions and statements is called a python module. So naturally, the file name is […]

Read more
Python return statement — step-by-step Python tutorial on Progressive Robot

Python return statement

URL: https://www.progressiverobot.com/python-return-statement/ The python return statement is used to return values from the function. We can use the return statement in a function only. It can't be used outside of a [Python function](/community/tutorials/python-function-arguments). Python Function without return statement Every function in Python returns something. If the function doesn't have any return statement, then it returns […]

Read more
Python String Functions — step-by-step Python tutorial on Progressive Robot

Python String Functions

URL: https://www.progressiverobot.com/python-string-functions/ Python provides a lot of built-in functions to manipulate strings. Python String is immutable, so all these functions return a new string and the original string remains unchanged. Python String Functions There are many functions to operate on String. However, it's not feasible to remember all of them. So here I am dividing […]

Read more
CHAT