{"id":12566,"date":"2021-07-15T19:56:38","date_gmt":"2021-07-15T14:26:38","guid":{"rendered":"https:\/\/python-programs.com\/?p=12566"},"modified":"2021-11-22T18:38:34","modified_gmt":"2021-11-22T13:08:34","slug":"python-program-to-check-if-a-given-word-contains-consecutive-letters-using-functions","status":"publish","type":"post","link":"https:\/\/python-programs.com\/python-program-to-check-if-a-given-word-contains-consecutive-letters-using-functions\/","title":{"rendered":"Python Program to Check if a given Word contains Consecutive Letters using Functions"},"content":{"rendered":"

Functions in Python:<\/strong><\/p>\n

In Python, a function is a grouping of connected statements that performs a computational, logical, or evaluative activity. The idea is to combine some often or repeatedly performed tasks into a function, so that instead of writing the same code for different inputs again and over, we may call the function and reuse the code contained within it.<\/p>\n

Built-in and user-defined functions are both possible. It aids the program’s ability to be concise, non-repetitive, and well-organized.<\/p>\n

Given a word the task is to check if the given word contains Consecutive letters using Functions.<\/p>\n

Examples:<\/strong><\/p>\n

Example1:<\/strong><\/p>\n

Input:<\/strong><\/p>\n

Given string = btechGeeks<\/pre>\n

Output:<\/strong><\/p>\n

The given string { btechGeeks } does not contains consecutive letters<\/pre>\n

Example2:<\/strong><\/p>\n

Input:<\/strong><\/p>\n

Given string = Abtechgeeks<\/pre>\n

Output:<\/strong><\/p>\n

The given string { Abtechgeeks } contains consecutive letters<\/pre>\n

Python Program to Check if a given Word contains Consecutive Letters using Functions<\/h2>\n

Below are the ways to check if the given word contains Consecutive letters using Functions.<\/p>\n