
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Concept explainers
Question
Hello....Its not correct...

Transcribed Image Text:The function len can be used to find out the length of a string, among other things.
The function returns the number of characters in a string.
Some examples of how this works:
word "abcd"
print (len (word))
print(len ("hi there"))
word2 = "howdydoody"
length = len (word2)
print (length)
empty_string=""
length len (empty_string)
print (length)
4
10
c
0
Please write a program which asks the user for a word and then prints out the
number of characters, if there was more than one typed in.
Examples of expected behaviour:
Please type in a word: hey
There are 3 letters in the word hey
Thank you!
Please type in a word: banana
There are 6 letters in the word banana
Thank you!
=
Please type in a word: b
Thank you!
1
2
3
4
5
6
▶ RUN
word=input("Please type in a word: ")
if len (word) > 1:
print("There are", len(word), "letters in the word", word)
print("Thank you!"
else:
TEST
Test Results
Sample output
Reset
Sample output
Sample output
Sample output
Need help?
FAIL: PythonEditorTest: test_long_words
With input auto, instead of two rows, your program's output is in 1 rows
Close
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution
Trending nowThis is a popular solution!
Step by stepSolved in 3 steps with 1 images

Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- Answer the given question with a proper explanation and step-by-step solution. Write a MASM program that calculates the nth Fibonacci sequence. The user will enter a positive integer n from the keyboard and output to the screen the resulting value. The first two values of the starting sequence are 0 and 1. Assume proper input. Output should be user friendly. Name the program: FiboNumsXX.asm, where XX are your initials. needs to beable to run in Visual Studio 2022 x86arrow_forwardWhat are three effective touchpoints for Apple?arrow_forwardCreate cout’s to put the value of each variable on the screen. If the number of decimal positions is different than you put in or it prints in scientific notation, it is still correct. Make the program beep 5 times using escape sequences. You may only hear one beep…they are spaced too closely together for the human ear to differentiate if your computer has a really fast processor.arrow_forward
- According to the program below is there anything wrong ? 1 mov al,00 2 mov bl,12h 3 mov al,bl 4 mov dl,dx 5 int 10h a All looks ok b First line you can’t move nothing (00) into the al c The second line you can’t move the number 12h into the BL d The third line you can’t move from the bl to the al e The fourth line you can’t move from the dx to the dlarrow_forwardI need help in learning the binary system and converting decimal numbers to binary. You are given a decimal number to convert into binary. Press the buttons to change their values so that the row represents the decimal number on the left. When a 1 is used, we consider the value to be oN. When a 0 is used, we consider the value to be off.arrow_forwardWhich of the following statements about the attenuation of light is/are FALSE? 1. The specular reflectance component of a surface. 2. A method of shading polygons. 3. Refers to the decrease in light intensity with distance from the light source. Select one: a. 1 and 2 b. 2 only C. 1 and 3 d. 2 and 3 e. 1 only ||| O <arrow_forward
- Help!!!arrow_forwardI am receiving an error on this code.......arrow_forwardE = D'C'B'A' + D'C'BA' + D'C'BA + D'CB'A + D'CBA' + D'CBA + DC'B'A' + DC'B'A F = D'C'B'A'+ D'CB'A' + D'CB'A + D'CBA' + DC'B'A' + DC'B'A G = D'C'B'A' + D'C'B'A + D'C'BA' + D'C'BA + D'CB'A' + D'CBA + DC'B'A' + DC'B'A H = D'C'BA' + D'C'BA + D'CB'A' + D'CB'A + D'CBA' + DC'B'A' + DC'B'A I = D'C'B'A' + D'C'BA' + D'CBA' + DC'B'A' J = D'C'B'A' + D'C'B'A + D'C'BA + D'CB'A' + D'CB'A +D'CBA' + D'CBA + DC'B'A' + DC'B'A K = D'C'B'A' + D'C'BA' + D'C'BA + D'CB'A + D'CBA' + DC'B'A'arrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education

Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON

Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education