I think I'm starting to get annoying now.
Yeah about the question, is it possible to create a "while loop" that consists of a nested if?
Yes, of cours!
a = 1 while True: if a > 5: print("A is greater than 5.") else: print('A is not greater than 5.')
This is a totally useless and simple example, but you can make them more complicated.
@Lanna It's usually helpful to include the code in a repl, so we can mess with it to figure out what's wrong :)
From what I see here, there are two problems. The first is you are already converting what the user inputs into a float, so the variable marks will be a float. If python cannot convert marks to a float, it will throw an error (ie if the user does not input a number).
So, marks is already a float. The isdigit function only exists for strings, and checking marks.isdigit will throw an error because marks is now a float (because you converted it earlier with float(blabla)!).
Another really small problem, which I think is what @a5rocks was referring to, is you need to call the isdigit function. This means instead of writing marks.isdigit, you must write marks.isdigit(). Leaving out the parenthesis does weird things! I think it will return the address of the function, instead of running it.
Let me know if anything is not clear!