Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python-Module-00 Ex03 #246

Open
2 tasks
sirius911 opened this issue Jul 21, 2022 · 8 comments
Open
2 tasks

Python-Module-00 Ex03 #246

sirius911 opened this issue Jul 21, 2022 · 8 comments
Labels
enhancement New feature or request

Comments

@sirius911
Copy link

  • 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
@madvid
Copy link
Collaborator

madvid commented Jul 25, 2022

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

Have a nice day

@madvid madvid closed this as completed Jul 25, 2022
@sirius911
Copy link
Author

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

@hmoumani
Copy link

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

@madvid
Copy link
Collaborator

madvid commented Aug 20, 2022

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 madvid reopened this Aug 20, 2022
@madvid madvid added enhancement New feature or request and removed fixme labels Aug 20, 2022
@hmoumani
Copy link

hmoumani commented Aug 21, 2022

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

@madvid
Copy link
Collaborator

madvid commented Aug 21, 2022

image

@madvid
Copy link
Collaborator

madvid commented Aug 21, 2022

Oh ! I remember, it is referring to printable characters

@madvid
Copy link
Collaborator

madvid commented Aug 21, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants