New to Nutbox?

SLC S21 Week4 || Mastering String Manipulation and Operations in Python. | My Participation

0 comments

ahsaniqbal24
52
23 hours agoSteemit2 min read

Assalam o Alaikum Everyone I hope all of you are fine and happy in your life. Here is my participation in the steemit contest. This is week 4 participation. This contest was organised by @kouba01. Contest is about learning python programming language. Python is huge market. We can do almost al things with python programing language. #steemexclusive

  • Task 1

I use these libraries for UI.
import sys
from PyQt5.QtWidgets import QApplication, QWidget, QLabel, QLineEdit, QPushButton, QVBoxLayout, QMessageBox

image.png

This I use for the input of two string.

image.png

The main thing is here to find an intersection between 2 strings.

image.png

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.

image.png

As I mentioned above, this program gives an error because it uses the upper-case alphabet. Here is the logic of this case.

image.png

This is the right intersection.

image.png

  • Task 2(Reverse String - Word Mirror)

image.png

Remainng GUI is same and and the main logic is here.

image.png

  • Task 3:

image.png

image.png

I use Caesar cipher (shift by 13) encryption. This is a basic cipher in cryptography.

image.png

  • Task 4:

image.png

image.png

image.png

  • Task 5(Word sord by length):

image.png

image.png

All the task have Almost same GUI code and same libraries. Twiter is ban in Pakistan so I am not able to share on twitter. Thank you so much for reading this blog. I invite @ammar2021,@teukuipul87 and @isha-rehman for participate in this contest.

Comments

Sort byBest