Questions: 5 831

Answers by our Experts: 5 728

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

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,lohi, and result.



A company wishes to bucketize their item ids for better search operators.the bucket for the item id is chosen on the basis of the maximum value of the digit in the item id write an algorithm to find the bucket to which the item id will be assigned.
A data compression software utilizes various steps to compress a string of data. One of the steps involves finding the count of characters that are not repeated in the string. Write an algorithm for the software developer to find the count of characters that are not repeated in the string.

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#


Fibonacci sequence is defined with an integer n as,
F(n)=F(n-1)+F(n-2) for n ≥2,where F(0)=0,F(1)=1.
develop a Python program to compute F(n) for a given integer between 0 and 20.
Input: Output:
0≤n≤20 F(n)≤2 to the power32
Compute F(n) starting with n=2 and increment iteratively until the required value is obtained.
instructions-
Create a text file include the value ofn. The text file needs to saved in same folder
where the source file has been saved. The file name will be given as input through terminal.
Develop a function named“getNum"to read number n from file.
Develop a function named “show” to display the given value n and computed value
of F(n) on screen. (Expected output format Fibonacci(3) = 2)
Develop a function “saveFile” to write what was displayed in (3) above to a text
file named"result.txt”. This file should be in same folder where source file is.
program must call suitable functions to do the task.

You are given a side of a square as input. Write a program to find the perimeter and area of the square.

Input

The input is an integer representing the length of the side of the square.

Output

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.

Explanation

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


an ecommerce company plans to give their customers a discount for the new year. the discount will be calculated on the basis of the bill amount is the product of the sum of all odd digits and the sum of even digits of the customer's total bill. if no odd-even digit is represented in the bill amount then 0 will be returned?
LATEST TUTORIALS
APPROVED BY CLIENTS