Output the starting position and length

Assignment Help Python Programming
Reference no: EM13168400

X Strings: Input a string. Output the starting position and length of the first occurrence of the longest substring of capital Xs in that string. The first letter is in position 1.

For example:

    ? XabXXXXXxxxXXXXXyyXX
    position=4 length=5

    ?XXabcXXXXyyXXXXcccXeeeXXX

    postion=5 lenght=4

   ?xxxabcDcdggc

    No Xs

If there are no Xs in the input string, print "no Xs".

Reference no: EM13168400

Questions Cloud

The provided code reads two sequences of numbers : The provided code reads two sequences of numbers. In this task, you are asked to write a function to insert these numbers into two separate doubly linked lists so that the data are in ascending order
The packing list describes the ideal contents : The packing list describes the ideal contents of each package, but it is not always possible to include the ideal number of each item. Therefore, the actual items included in each package should be tracked. A package can contain many different ite..
Variable of type string that has been assigned : Assume that word is a variable of type string that has been assigned a value. Write an expression whose value is a string consisting of the last three characters of the value word. So if if the value if word were "biggest" the expression's value w..
Need the build function.use recursion : Implement remaining function. Everything else is provided. Use given material to receive points. Implement remaining function. Everything else is provided. Use given material to receive points. Implement remaining function. Everything else is provide..
Output the starting position and length : X Strings: Input a string. Output the starting position and length of the first occurrence of the longest substring of capital Xs in that string. The first letter is in position 1.
Determine the optimal yearly production plan : Determine the optimal yearly production plan for the ore processed by the Luna Mining Company and prepare a budgeted income statement before taxes for LMC for 2015, and determine the pretax profit on sales percentage.
Calculate the molar entropy of evaporation of ccl3f : Trichlorofluoromethane (CCl3F) boils at 23.8C, and its molar heat of vaporization is 24.8 kJ/mol. Calculate the molar entropy of evaporation of CCl3F(l).
Write a string expression that parenthesizes the value : Given a string varible word, write a string expression that parenthesizes the value of word. So if the word contains "sadly" the value of the expression would be the string "(sadly)".
State the condensed structural formula for the product : what is the condensed structural formula for the product of the hydrogenation of 2-butene using a platinum catalyst

Reviews

Write a Review

Python Programming Questions & Answers

  Console program where you will implement

Create a console program where you will implement coding constructs and variables that are needed for this program and will implement the code within Main and any required static methods.

  Same directory as your program

In the same directory as your program, create a file FF1, and write into it Hello (with a space at teh end). Similarly, create a file FF2, and write into it world! (with a new line, i.e., an ENTER at the end). And create a file DD and write into i..

  Python errors

python errors, please correct them that are located in this program,

  A stack data structure that uses a linked list for storing

In Python, implement a stack data structure that uses a linked list for storing its elements. In particular, you will need to implement the following three functions: 1. top(): This function returns the element that is at the top of the stack, but it..

  Program that allows the user to enter the type of coin

Create a program that allows the user to enter the type of coin to be evaluated and the number of coins. The program should calculate the total weight of the coins and the height of the coins when stacked. Name the program coins.py. Use the table bel..

  Prepare a python program

Prepare a Python program which evaluates how many stuck numbers there are in a range of integers. The range will be input as two command-line arguments.

  Create a simple and responsive gui

Please use primarily PHP or Python to solve the exercise and create a simple and responsive GUI, using HTML, CSS and JavaScript.Do not use a database.

  The initial number for generating the sequences

Then, after the functions, read in the initial number for generating the sequences. Here, check that it is a positive integer. If it is not, give an error message and exit the program.

  The interest rate per period

The interest rate per period. For example, if your loan's interest is 6.5% per year, and you are paying monthly, this would be 6.5%/12. If you are paying every two weeks, r would be 6.5%/26, because there are 26 two-week periods in a year.

  Function should return a dictionary

Write a function numOccur(s), where s is a string; the function should return a dictionary whose keys are the 26 ascii letters abcdefghijklmnopqrstuvwxyz

  Write python program to create factors of numbers

Write down a python program which takes two numbers and creates the factors of both numbers and displays the greatest common factor.

  Design program that asks user to enter amount in python

IN Python Design a program that asks the user to enter the amount that he or she has budget in a month. A loop should then prompt the user to enter his or her expenses for the month.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd