Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Instructions My six year-old daughter LOVES to read. However, she is still learning and so she can only handle words of a certain length. She

Instructions

My six year-old daughter LOVES to read. However, she is still learning and so she can only handle words of a certain length. She also loves to count, but big numbers are not her strength! Help her out!

You are going to read in a word. After you find the length of the word, you will output how long it is, unless it is "too big". If the word is more than 10 characters long, you will simply output the phrase "TOO BIG!"

Hint: You are going to need to the len() the str() functions and also make a decision! Remember (from practicum today!) that you can not concatenate a string with an integer. You must first convert the integer into a string by using the str() function.

Details

Input

The program takes in the following input:

  • word: an string

Processing

  • Find the length of the string word

  • Make a decision based on the length of the word and handle output based on this, as defined below.

Output

  • For words of length up to 10 characters, output:
 The length of the word is {Length of the word}.
  • Otherwise, output:
 TOO BIG!

Sample input/output:

Input Output

pumpkin

The length of the word is 7.

apple

The length of the word is 6.

lexicographical

TOO BIG!

pie

The length of the word is 3.

sesquipedalian

TOO BIG!

Haligonian

The length of the word is 10.

Haligonians

TOO BIG!

Using python

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle Solaris 11.2 System Administration (oracle Press)

Authors: Harry Foxwell

1st Edition

007184421X, 9780071844215

More Books

Students also viewed these Databases questions