Numbers in String - 2
Given a string, write a program to return the sum and average of the numbers that appear in the string, ignoring all other characters.
Secret Message - 2
Given a string, write a program to print a secret message that replaces characters with numbers 'a' with 1, 'b' with 2, ..., 'z' with 26 where characters are separated by '-'.
Note: You need to replace both uppercase and lowercase characters. You can ignore replacing all characters that are not letters.
a b c d e f g h i j
1 2 3 4 5 6 7 8 9 10
k l m n o p q r
11 12 13 14 15 16 17 18
s t u v w x y z
19 20 21 22 23 24 25 26
In this exercise, use the following <span style="text-decoration-line: none;">variables</span>: i,lo, hi, and result. Assume that lo and hi each are associated with an int and that result refers to 0.
Write a while loop that adds the integers from lo up through hi (inclusive), and associates the sum with result.
Your code should not change the values associated with lo and hi. Also, just use these <span style="text-decoration-line: none;">variables</span>: i,lo, hi, and result.
PyQT
I created a button Upload. I hope to have the function of clicking on the button will direct me to selecting my file which contains of images, bulk of images and copy them into another specific folder named "Upload"
Question 1: Create a program to generate a password length 12 6 random == "A-Z a-z" 4 --> digits 2 -- > special characters Expected Output: $ji12kt56yU#
You are given a side of a square as input. Write a program to find the perimeter and area of the square.
The input is an integer representing the length of the side of the square.
The first line of the output should contain area of the square, and the second line of the output should contain the perimeter of the square as per the format shown in the sample output.
Given the length of the side is
2. As the area of square is
side*side and the perimeter of the square is 4*side.Then output should be