Python-Module-00 Ex03 · Issue #246 · 42-AI/bootcamp_python · GitHub
Skip to content

Python-Module-00 Ex03 #246

Open
Open

Description

@sirius911
  • 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

Activity

  1. madvid commented on Jul 25, 2022

    @madvid
    Collaborator

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

    Have a nice day

  2. sirius911 commented on Jul 25, 2022

    @sirius911
    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

  3. hmoumani commented on Aug 19, 2022

    @hmoumani

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

  4. madvid commented on Aug 20, 2022

    @madvid
    Collaborator

    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

  5. reopened this on Aug 20, 2022
  6. added
    enhancementNew feature or request
    and removed on Aug 20, 2022
  7. hmoumani commented on Aug 21, 2022

    @hmoumani

    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

  8. madvid commented on Aug 21, 2022

    @madvid
    Collaborator

    image

  9. madvid commented on Aug 21, 2022

    @madvid
    Collaborator

    Oh ! I remember, it is referring to printable characters

  10. madvid commented on Aug 21, 2022

    @madvid
    Collaborator

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions