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

  Write a program using the ''requetinteger''

using python/jython programming write a program using the 'requetInteger' function that will ask the user to type a value that will draw a line from one point on a picture to another. I don't need specific help just a gerneral idea.

  Recursion to write a python function

Use recursion to write a Python function depth(LL), where LL is a nested list of lists of lists etc. of numbers (i.e., oat and int) and strings. We want to return the depth of nesting, i.e., how often, maximally, there is a list in a list etc

  A string is valid windows filename.

writing a function in python that verifies whether a string is valid windows filename.

  Grade that will calculate and return a student''s exam

Write a function overall Grade that will calculate and return a student's 2316 exam average. It will accept five parameters, which correspond to exam1,2,3,4 and the Final grade. It should replace the lowest exam grade with the 2nd lowest exam grade

  Turn the turtle image into a .gif picture

How can you turn the turtle image into a .gif picture when using the built-in turtle for Python? If that's impossible how do you remove the line when you move the turtle around?

  Evaluate a user''s expression

Write a function that will evaluate a user's expression. It should call the getExpression function that you previously wrote to get the expression to evaluate from the user. You should evaluate the expression step-by-step.

  Let ll be a list of integers

Let LL be a list of integers. Use list comprehension to produce teh following lists. Each one should just take onel line. Anser questions as two comments.

  Fill in the python code

Fill in the Python code to play Tic Tac Toe. I won't award points unless it runs succesfully. # Tic-Tac-Toe Game def drawBoard(board): # Draws the board using the list of numbers print(" ") print(" ",board[0]," | ",board[1]," | ", board[2]) print("--..

  Implement functions for insertion sort

Implement functions for Insertion sort and bubble sort in python programming language and a function that calculates the function execution time.

  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 by sum of sines

code the program using an editor (DO NOT COMMAND LINE THE PROGRAM) and show the results

  Design a prgram using python

Design a prgram USING PYTHON that students can use to calculate what score they need on final exam to get a certan final grade for a course.

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