Determine the length of the entered string

Assignment Help Python Programming
Reference no: EM132360881

String Report

In this programming assignment you are going to use the material covered in Chapter 8 More About Strings to write a program called stringreport.py that creates a report about a string entered by the user at a prompt.

Requirements

Request a string from the user using the prompt "Enter a string: " and do the following:

• Determine the length of the entered string and do one of the following:

o If it is zero characters in length output the message "You did not enter anything!" and exit the program.

o If the entered string is one or more characters in length display the following information about the string and exit the program.

The length of the string. That is, the number of characters it contains.

The first character of the string.

The last character of the string.

Indicate if the string contains the word "open".

Indicate if the string contains only alphabetic letters and spaces.

Indicate if it contains only numeric digits.

Indicate if the entire string is lower case.

Indicate if the entire string is upper case.

Note: For the items above that say "Indicate if...", the output is to present a "yes" or "no".

Reference no: EM132360881

Questions Cloud

How the role will impact patient outcomes : The elevator door opens; you step on and find yourself face to face with a known skeptical colleague, who inquires "what are you doing in your profession"?
Design a program that creates an object of the class : Design a program that creates an object of the class and prompts the user to enter the name, type, and age of his pet.
What pain scale are you using : It is 10 pm and you make assessment rounds and find Bobby crying. You ask him what his pain level is. What pain scale are you using?
Classify each threat on a probability-impact matrix : MIS761 – Enterprise Information Management and Security - Deakin University - design of payment systems is outside the scope of this project
Determine the length of the entered string : Determine the length of the entered string and do one of the following: If it is zero characters in length output the message.
What are the aspects of the speech : Select an object, person or place that represents a significant aspect of your cultural background, personality, values, ambitions, etc. Even something.
Provide an example of an array : Lists and arrays can be valuable tools for the programmer. Provide an example of a ‘list' and explain how it would be used as part of a problem solution.
About advertising and social media : We're talking a lot about advertising and social media this week. Describe how social media plays into the intent and the actual message?
Need a python program that counts the number of primes : You need a python program that counts the number of primes less than any given number.

Reviews

Write a Review

Python Programming Questions & Answers

  How to read a html file using python

How to read a html file using python, then extract id and links in that file.

  Compare the users choice and the computers choice

Prompt user to select either Rock or Scissors. Instruct computer to randomly select either Paper or Scissors. Compare user's choice and the computer's choice

  Analyse the performance of a drone

analyse the performance of a drone, first run the simulation normally - The actual route the drone finds can then be compared to this ‘perfect knowledge route'

  Write a recursive function that takes in a list

For this part of the homework, you will write a recursive function that takes in a list of positive integers as a parameter, and prints out the maximum value in that list. Your recursive function should be called maxInt().

  Write a python program that saves du in the text file

Write a Python program that saves "DU" in the file txt file. Write a Python program that will allow the user to enter following information for three students.

  Build a program to create two types of utility bills

Define a calculate_charge method, which asks the user to enter kilowatt hours used and uses it to calculate total charge.

  Investigate mortality levels of infants and babies

ICT702 - Which countries have a high rate of child deaths and which countries have low rates? Are there connections between child mortality rates

  Explain a python program storing and processing simple bank

A Python program storing and processing simple bank records is in the early stages of development. The records are stored in a text file (bank.txt) that contains, for each bank customer, their given name, account number and balance.

  Display positions of the first occurrence of common letters

Write program named common Letter.py that prompts user to enter two words, and display the positions of the first occurrence of common letter in both words.

  Write a program that prints the longest substring

HIT137 SOFTWARE NOW - Charles Darwin University - Write a program that prints the longest substring - Write a python program that allows the user to navigate

  Write the code to allow user to input three integer numbers

Write the code to allow a user to input three integer numbers. The program will then produce the average of thosethree numbers

  A python program that takes a value from a user and store

You need help writing a Python program that takes a value from a user and stores it in the registry.

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