Python Basics: Conditional Logic and Control Flow (Quiz)
emmanuel on Nov. 17, 2024
I wrote this with the test and I got unexpected format which I find strange
if a<=b :
m=a
else:
m=b
Sorry but this works :-)
emmanuel on Nov. 17, 2024
Its really annoying, I have done the test like 4 times and it does not show as being completed …Can you please tell me how to exit that infinite loop
emmanuel on Nov. 17, 2024
Its really annoying, I have done the test like 4 times and it does not show as being completed …Can you please tell me how to exit that infinite loop
Martin Breuss RP Team on Nov. 18, 2024
@emmanuel hi, yes your solution works, and it’s the same as one of the provided answer solutions, just your formatting is a bit off.
On one hand I’d agree that ideally our tests would ignore formatting, but they aren’t set up to easily handle that. It’d work if the task was about writing a function and we could check for function output, but that’s not the case in this example.
Anyways, there’s a value in the feedback you received, in that your formatting is not following PEP 8, which is the standard to writing maintainable Python code. It works also when you do whitespace differently, like in your case, but it’s better to start following the style guidelines already early on. It’ll make it more straightforward to write and read your code.
Quiz Completion
As for the completion of the quiz, you need to mark it as Completed manually when you feel that you understand the content well enough and you are ready to move on.
Quizzes currently don’t keep track of your answers over multiple runs and are meant as a knowledge-check and learning tool that you can submit multiple times.
To get the 100 percent completion on your course, you can mark it as complete manually using the button under the lesson title.
Hope that helps, and sorry that this felt frustrating!
Become a Member to join the conversation.
Francisco Martínez B on Aug. 24, 2023
The comparation between numbers and letters take me unarmed.