bootcamp_python icon indicating copy to clipboard operation
bootcamp_python copied to clipboard

Python-Module-00 Ex03

Open sirius911 opened this issue 3 years ago • 8 comments

  • Day: 00
  • Exercise: 03

The examples for the text_analyzer() function are strange and I think wrong

Examples

$> python3 count.py 'Hello World!'
The text contains 8 character(s):
- 2 upper letter(s)
- 8 lower letter(s)
- 1 punctuation mark(s)
- 1 space(s)

Why "Hello World!" contains only 8 characters ? Thks

Fixed on:

  • [ ] Github
  • [ ] Gitlab

sirius911 avatar Jul 21 '22 13:07 sirius911

Hello @sirius911, You are misunderstanding the notion of characters. The exercise is correct.

Have a nice day

madvid avatar Jul 25 '22 08:07 madvid

Hello, Ok, so when the example writes:

$> python3 count.py 'Hello World!'
The text contains 8 characters:
- 2 upper letter(s)
- 8 lower letter(s)
- 1 punctuation mark(s)
- 1 space(s)

8 characters means 8 lower letters ?(I am talking about the first line displayed and not the detail that follows) because for me Hello World! contains 8 lower letters, 2 upper letters,1 punctuation and 1 space, which makes a total of 12 letters. It's strange to display this line first, especially since the following seems to be the detail of this total number of characters. We tend to write the total number of characters first. Thanks. Have a good day Thanks. Have a good day

sirius911 avatar Jul 25 '22 11:07 sirius911

Hello, i have the same issue in this exercise, do you guys have any update? thanks in advance!

hmoumani avatar Aug 19 '22 21:08 hmoumani

The count does not refer to lowercase or uppercase. In "Hello World!" one can observe that you have the fonts 'H', 'e', 'l', 'o', 'W', 'r' 'd' and '!' which make 8 unique font sign. I will consider adding another examples then

madvid avatar Aug 20 '22 13:08 madvid

Hello, thank you for answering, but i'm still confused, because based on the example you gave, this one (from subject) is wrong:

>>> text_analyzer("Python 2.0, released 2000, introduced
features like List comprehensions and a garbage collection
system capable of collecting reference cycles.")
The text contains 143 character(s):
- 2 upper letter(s)
- 113 lower letter(s)
- 4 punctuation mark(s)
- 18 space(s)

can you please investigate this case? thanks again

hmoumani avatar Aug 21 '22 05:08 hmoumani

image

madvid avatar Aug 21 '22 17:08 madvid

Oh ! I remember, it is referring to printable characters

madvid avatar Aug 21 '22 17:08 madvid

PR has been done, it is waiting for review from the boss

madvid avatar Aug 21 '22 18:08 madvid