A Short and Simple Python Script

# file: App.py

name = input("Hello, what's your name?: ")

print("Hello, " + name + ", and welcome!")

#Taking an integer value and assigning it to the service variable for later use

service = int(input("Now please take a sit and tell me how many guests are you bringing with you tonight?: "))

#Making a condition to define if the subjects will be plural or singular

if service > 1:

    invitee = " guests"

    table = " them."

    clients = " all"



Batch Image Resize

Question! How to resize multiple images at once.

Answer!  You will first need a tool called ImageMagick, so bring up the console and type in the following command to install it :

apt-get install imagemagick

 Then type the following command in the console :

for i in $( ls *.jpg); do convert -resize 50% $i re_$i; done


Mounting ISO files

Question! How to mount an ISO image file so that you can read its content.

Answer! Type the following command in the console :

mount -o loop <ISO file> <target directory>

Note! Replace <ISO file> and <target directory> by the corresponding names.

Subscribe to linux