Yea okay, that makes so much more sense to my. I was ramming my head against the wall trying to let python do the math without using anything that has not been shown yet.
Also in day3 exercise 20. Check if int('9.8') is equal to 10.
You can't do that int bc it's not taking '9.8' as a string. Is that correct or did I do smth wrong? I changed it to int(9.8) effectively converting float to int instead of str and it works.
K
Okay I'm out for the last exercise with the table script. Can someone please show me a solution for that one? I'm at my wits end.
Yah what u did at last is correct since its a string with decimal ur supposed to convert it to float then to int it can be written like this int(float('9.8))
https://www.geeksforgeeks.org/python/python-string-strip/
The strip method removes by default whitespaces at the beginning and end of a string. If you specify a string as you did, it will remove the characters at the beginning and end that belong to that set of characters.
In your case, you can see it as if you passed the set (n, o, t, h) to be removed, so if it finds one of those characters at the beginning or end, it will remove them, hence your result is 'irty days of py'