print threeNum
b. check if index 0 is < 5
i. if threeNum[0] < 5, replace index 0 with the string: “small”
ii. else, replace index 0 with a string: “large”
c. print threeNum
i have to do this, but when i put the proper signs in, it throws a error at me. Any ideas for what i can do to fix it?
I Need Help...
print threeNum
b. check if index 0 is < 5
i. if threeNum[0] < 5, replace index 0 with the string: “small”
ii. else, replace index 0 with a string: “large”
c. print threeNum
i have to do this, but when i put the proper signs in, it throws a error at me. Any ideas for what i can do to fix it?
You need to do this:
You need to convert that first index of the list into a integer, since you have all strings in your list
If you have a list of strings, convert the indices to integers
or
make the list all integers
do
threeNum = [2, 7, 9] instead of threeNum = ["2", "7", "9"]
THANK YOU!!! THAT WORKED.
@SUHASTADIPARTH1:) hope you and everyone else is safe during COVID-19.
@SUHASTADIPARTH1tbh i hope COVID-19 ends soon. COVID is getting old, quick. if you or anyone on here got hit by Hurricane zeta, i hope yall are safe and sound.
@SUHASTADIPARTH1