SLC S21W4: Mastering Strings Manipulation and Operations in Python

in #dynamicdev-s21w47 days ago (edited)

Black Gold Elegant Jewelry Logo_20241124_075201_0000.png

edited with canva

Hello friends and welcome to SLC S21/W4 in this challenge, I would be trying my possible best in relieving answers to these quality questions by performing the required tasks.


"Task 1:Create a Python program with a graphical user interface (GUI) using PyQt5 to find the intersection of characters between two strings. The program must validate that both strings contain only lowercase alphabetic characters (a-z) and are between 1 and 30 characters long. If either string is invalid, an error message is displayed."

Using the libraries from PyQt5 Qtwidget, QApplication, Qlabel, QlineEdit, QPush Button I came up with these conclusion.

Screenshot_20241124-065105.pngScreenshot_20241124-064636.png
Screenshot_20241124-065622.png

Technically, these programs must validate both strings contain only lower case alphabet (a-z) between 1 and 30 characters long. Either string is invalid or an error message is displayed

Screenshot_20241124-082041.pngright✅Screenshot_20241124-081625.pngwrong❌

This program provides error because it uses uppercase alphabet and this is logical representation.


"Task 2:Create a Python program with a graphical user interface (GUI) using PyQt5 to reverse the characters of each word in a string, preserving the word order. The program validates that the input string contains only lowercase alphabetic characters and spaces, is between 1 and 50 characters long, and does not start or end with a space. Consecutive spaces are not allowed between words.

Screenshot_20241124-085034.pngbeforeScreenshot_20241124-084954.pngafter

"Task3:Create a Python program with a graphical user interface (GUI) using PyQt5 to encrypt a string by combining Caesar cipher rotation (by 13 positions) and reversing the rotated string. The program validates that the input string contains only lowercase alphabetic characters (a-z) and has a length between 1 and 9. If the input is invalid, an appropriate error message is displayed."
Screenshot_20241124-083359.pngScreenshot_20241124-071515.png

Using ceaser cipher Shift 13 encryption, it becomes cipher in cryptography.


Task 4: Create a Python program with a graphical user interface (GUI) using PyQt5 to verify whether two positive integers form a "perfect succession." A perfect succession is defined as a series of digits from the two numbers that, when combined and sorted, form a sequence where each digit increments by one. The program validates that the inputs are positive integers. If either input is invalid, an appropriate error message is displayed.
Screenshot_20241124-072222.pngScreenshot_20241124-072201.png
Screenshot_20241124-072040.png


Task5: Create a Python program with a graphical user interface (GUI) using PyQt5 to process a sentence by sorting its words based on their lengths in ascending order. The program validates that the input string adheres to the following rules: it must start with a letter, end with a period, have a maximum of 15 words, and contain only single spaces between words. If the input fails any of these validations, an appropriate error message is displayed.

Screenshot_20241124-073213.pngScreenshot_20241124-072713.png

Cc;
@kouba01

I have successfully concluded this conquest and invite @josepha @ruthjoe @simonwnigwe @chant to join challenge

Sort:  
Loading...

Sorry, correct tag #dynamicdevs-s21w4.

You have done well. Please chat me on WhatsApp 08025460619

please use our right tag #dynamicdevs-s21w4

Noted and corrected sir