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

First and last digits

Given two numbers M and N, write a program to count of the numbers which have the same first and last digits in the given range M to N(inclusive M and N)


Input

the first line of input will contain a positive integer M.

the second line of input will contain a positive integer N.

output

The output should be an integer denoting the count of the numbers in the range which meet the given condition.


Explanation

For example, if the given number are M is 5and N is 30, the numbers which have the first and last digit equal in the given range(5,6,....29,30) are 5 6 7 8 9 11 and 22. so the output should be 7.


sample input 1

5

30

sample output 1

7

sample input 2

1

10

sample output 2

9


Elements of anti diagonal

Write a program to print the anti-diagonal elements in the given matrix.


input

The first line of input will contain an integer N, denoting the number of rows and columns of the input matrix.

the second line of input will contain N space-separated integers denoting the elements of each row of the matrix.


output

The output should be a list containing the anti-diagonal elements.


explanation

For example, if the given N is 3, and the given matrix is

1 2 3

4 5 6

7 8 9


The anti-diagonal elements of the above matrix are 3 5 7. so the output should be the list

[3, 5, 7]


sample input 1

3

1 2 3

4 5 6

7 8 9

sample output 1

[3, 5, 7]

sample input 2

5

44 71 46 2 15

97 21 41 69 18

78 62 77 46 63

16 92 86 21 52

71 90 86 17 96

sample output 2

[15, 69, 77, 92, 71]


Interleave String

Given two strings, write a program to merge the given two strings by adding characters in alternating order, starting with the first string. If a string is longer than the other, append the additional characters onto the end of the merged string.

input

the first line of input will containing a string.

the second line of input will containing a string.

the strings may contain special characters ,digits and string.

output

the output should be the merged string

explanation

For example, if the given strings are "abc" and "pqrs", then alternating characters from each string are merged as "a" from "abc", "p" from "pqr" "b" from "abc" and so on ...., resulting in the merged string "apbqcr".

sample input 1

abc

pqr

sample output 1

apbqcr

sample input 2

abc

pqrst

sample output 2

apbqcrst


Yes your output is right thank you, but I am sorry I am not expecting this output,



Input: 1



3




Your output: 1



2



3




My expecting output : 1 2 3




Please review

Account name Account pin Account balance

RHEA TORTOR 123456789 50000

Iya nayang 987612 2000

Andrea villianueva 907542 500


Requirements:


  • The must be a main function that will display the menu and will ask for user's choice and pin.


The menu is shown below:

1 – Balance Inquiry

2 – Withdraw

3 – Deposit

X – Exit


  • For each choice 1, 2 and 3, create an appropriate user-defined function for each task.
  • Provide validation for input.


Score will be updated before encoded in BBL for the following:

  • 40 points deduction if there is no user defined function created at all.
  • 20 points deduction if all user defined function are void functions and no arguments.


Input


1. data

Output


Enter·pin:·123489
1·–·Balance·Inquiry
2·–·Withdraw
3·–·Deposit··
X·–·Exit
Enter·your·choice:··X
Thank·you·for·banking·with·us!

python program that needs to ask the user for her or his email address in the formatfirstname.lastname@bahria.edu.pk OR firstname.lastname@gmail.com. The application takes asinput this email address, parses the email and replies to the user with first name, last name and hostname


please find the question attached here,

https://drive.google.com/file/d/1K2zxTlrDBnlJ76BaZxSMe90-a5Wu4X11/view?usp=sharing




please find attached questions,

https://drive.google.com/file/d/1Xz5GwV0PswLHvdgqTWG6HgnQ0PEp1cD4/view?usp=sharing


please find attached questions,

https://drive.google.com/file/d/1DhafB2Fq_tpfPob4k8VQUCTMwIKHZfgj/view?usp=sharing


please find the attached questions,

https://drive.google.com/file/d/1zFjZAMaMZSDxIJalG37TDhLl1XfsukEv/view?usp=sharing


LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS