When input is "python learning" output displayed is 16-25-20-8-15-14- 12-5-1-18-14-9-14-7 there is additional - after 14 digit. how to rectify this issue?
Speed Typing Test
In this assignment, let's build a Speed Typing Test by applying the concepts we learned till now.
Refer to the below image.
https://assets.ccbp.in/frontend/content/dynamic-webapps/speed-typing-test-output.gif
Armstrong numbers between two intervals
Write a program to print all the Armstrong numbers in the given range
The first line has an integer
Print all Armstrong numbers separated by a space.
If there are no Armstrong numbers in the given range, print
For
A = 150 and B = 200For example, if we take number 153, the sum of the cube of digits
1, 5, 3 is 13 + 53 + 33 = 153.
So, the output should be
153.
Sample Input 1
150
200
Sample Output 1
153
Sample Input 2
1
3
Sample Output 2
1 2 3
6 / 8 Test Cases Passed
*When you submit the code, we will run it against a set of exhaustive test cases.
Input
1
2
10
15
Your Output
Expected
-1Given polynomial, write a program that prints polynomial in Cix^Pi + Ci-1x^Pi-1 + .... + C1x +
The first line contains a single integer N.
Next N lines contain two integers Pi, Ci separated with space, where Pi denotes power and Ci denotes coefficient of Pi.Output
For term Cix^Pi, if the coefficient of the term Ci is 1, print x^Pi instead of 1x^Pi.Explanation
N <= 100
0 <= Pi < 1000
-1000 <= Ci <= 1000
Sample Input
4
0 5
1 0
2 10
3 6
Sample Output
6x^3 + 10x^2 + 5
Failed Testcases:
Your Output7x^4 + 6x^3 + 1x^2 + 3 + 2Expected
7x^4 + 6x^3 + x^2 + 3x + 2Half Pyramid - 4
Given an integer N as a starting number and K as input, write a program to print a number pyramid of K rows as shown below.
Input
The first line of input is an integer N.
The second line of input is an integer K.
Explanation
In the example, the given starting number is 10, and the number of rows in the pyramid is 5.
So, the output should be
24
23 22
21 20 19
18 17 16 15
14 13 12 11 10
Write a program to output the following:
_ _
(,)_(,)
| ''|
=| @|=
---Hint: Copying and pasting the code above into each line of the programming environment will help you ensure that you are accurately spacing out the required characters. Remember to also use double quotation marks (") in your print command, to distinguish them from any single quotation marks (') you may need to use to successfully output the image.
Hollow Inverted Full Pyramid - 2
Given the number of rows N, write a program to print the hallow inverted full pyramid pattern similar to the pattern shown below.
1 2 3 4 5
1 4
1 3
1 2
1
Last half of List
You are given an integer N as input. Write a program to read N inputs and print a list containing the elements in the last half of the list.
Replacing Characters of Sentence
You are given a string S. Write a program to replace each letter of the string with the next letter that comes in the English alphabet.
Note: Ensure that while replacing the letters, uppercase should be replaced with uppercase letters, and lowercase should be replaced with lowercase letters.
First Prime Number
You are given N inputs. Write a program to print the first prime number in the given inputs.