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

session-1 feedback #14

Closed
kbjarkefur opened this issue Aug 22, 2022 · 12 comments
Closed

session-1 feedback #14

kbjarkefur opened this issue Aug 22, 2022 · 12 comments

Comments

@kbjarkefur
Copy link
Contributor

Feedback on session Aug 22, 2022

@weilu
Copy link
Member

weilu commented Aug 22, 2022

y = int(7.25)
print(y, type(y))

Note: type parsing from float to int drops everything after decimal point

@luisesanmartin
Copy link
Member

y = int(7.25)
print(y, type(y))

Note: type parsing from float to int drops everything after decimal point

Related to this, using a number with a decimal part higher or equal than .5 would be a good way to show that int() drops the decimal part as opposed to rounding a decimal number

@weilu
Copy link
Member

weilu commented Aug 22, 2022

String section: add string interpolation / f-string. Consider replacing str.format with f-string

@weilu
Copy link
Member

weilu commented Aug 22, 2022

Should the concept of a function/method covered before one is used e.g. str.upper?

@weilu
Copy link
Member

weilu commented Aug 22, 2022

Potentially useful to add: To see all available functions on strings, you can type dir(str) or dir(""). Then for each of the function to bring up the documentation/help, type the method name followed by ? e.g. str.capitalize?

@weilu
Copy link
Member

weilu commented Aug 22, 2022

Exercise 6 a and b may need revision as they can be hacked by putting in a and b

@luisesanmartin
Copy link
Member

we might want to add something related to help() or using the ? character after a function to check function/methods documentation

@luisesanmartin
Copy link
Member

nested list examples: second index needs to be changed to 2

# Access item in nested lists "f"
f = nested_list[2][0]

@weilu
Copy link
Member

weilu commented Aug 22, 2022

Exercise 8 needs more time than 8 minutes

@weilu
Copy link
Member

weilu commented Aug 22, 2022

Exercise 9 needs more than 4 minutes

@kbjarkefur
Copy link
Contributor Author

Nested list index bug fixed in : 6d791a7

@kbjarkefur
Copy link
Contributor Author

dict functions to add:

  • .values(), .keys(), .items()

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

No branches or pull requests

3 participants