Skip to content

Errors found in basic_datatypes #267

Closed

Description

@despadam
  • Explain string interpolation in the Intro to Python notebook #342
  • Start with explaining the difference between print and return (probably in the intro). They get confused by the solution function syntax.
  • math was not imported for solution_quadratic_equation
  • Make the description more clear for exercises lists_are_equal and lists_are_not_same_but_equal
  • Move each exercise description above the expected exercise solution, otherwise you have to scroll a lot after printing the test outputs.
  • Exercise remove every second element from list does not have a clear description. Should we use 'return' or 'extract' instead of 'remove'?
  • In the speed comparison between set, list, tuple can we hide the code and only print the result of the comparison?

Activity

  1. changed the title [-]Nov24-Intro-Tutorial: Errors found in `basic_datatypes`[/-] [+]Errors found in `basic_datatypes`[/+] on Nov 27, 2024
  2. edoardob90 commented on Nov 27, 2024

    @edoardob90
    Member

    Exercise 1 of dictionaries: "Write a program that receives a dictionary and a key as input and returns the value of the key if it is in the dictionary, None otherwise. The dictionary should remain unchanged."

    We should make it clear that the key to return is key, the input variable.

  3. Snowwpanda commented on Nov 27, 2024

    @Snowwpanda
    Collaborator
    • True and False are like 1 and 0 in a set, and there is some wierd behavior if we put 1 and True into a set, one of the examples in sets does this and should probably be taken out.
  4. edoardob90 commented on Nov 28, 2024

    @edoardob90
    Member

    Definition of string.strip(). We have

    returns a copy of the string with any leading or trailing characters whitespaces removed

    Should be

    return a copy of the string with the leading and trailing whitespace characters removed. You can pass a string argument, and all the combinations of its values are removed

  5. added this to the milestone on Sep 29, 2025
  6. linked a pull request that will close this issueFix errors in Basic Datatypes #341on Nov 9, 2025
  7. Snowwpanda commented on Nov 12, 2025

    @Snowwpanda
    Collaborator
    • Typehint in def solution_a_plus_b_equals_c(a: float, b: float, c: float) -> float:
      output should be boolean
    • Lists - Exercise 2: Write a program that takes a list and returns the first and last element of the list as a tuple --> we should reformulate without tuple, since tuples arent explained yet. Check if more exercises have the same mistake.
    • Strings - Exercise 4: Write a program that receives a list of words as input and returns a string consisting of the words in the list separated by commas. --> Maybe make the desctiption more clear? It was not clear that you need to call join on a string and not a list.
  8. edoardob90 commented on Nov 12, 2025

    @edoardob90
    Member

    See #347 (issue related to Nov 2025 tutorial). Just to keep things as tidy as possible, I'm closing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions