if True:
if x<1 and x>0: print('Valid input')
if x<1 and x>0: print('Valid input')
•
Firstly, you want to repeat on a logical expression which has the opposite effect. Also, in most cases you'd usually use 'binary' logical expressions (meaning two operands, not three) and join those together using AND/OR... e.g. (a less than b OR y greater than z)
•
Secondly, the task is to repeatedly re-ask the question if the input is invalid.. at the moment the 'print("valid input")' is being repeated instead.
Last reply 1 minute ago
cons of uni of kent higher/degree? professional economics course??Last reply 2 minutes ago
Children to no longer be prescribed puberty blockers, NHS England confirmsLast reply 3 minutes ago
Official London School of Economics and Political Science 2024 Applicant ThreadPosted 4 minutes ago
Mindfulness Photography for Mental Well-being (18-26, instagram users)Last reply 6 minutes ago
Inlaks, Commonwealth, and Other Scholarships for Indian Students 2024: ThreadLast reply 8 minutes ago
Official Cambridge Postgraduate Applicants 2024 ThreadLast reply 9 minutes ago
Revise together - Edexcel AL EngLit: Lear, Earnest, Frankenstein, NLMG, Keats :)Last reply 10 minutes ago
Official: University of Manchester A106 2024 Entry Applicants1260
Last reply 10 minutes ago
yet to receive a woodhouse interviewLast reply 1 week ago
OCR A-level Computer Science Paper 2 (H446/02) - 19th June 2023 [Exam Chat]Last reply 2 weeks ago
AQA A-level Computer Science Paper 1 (7517 1A - 1E) - 12th June 2023 [Exam Chat]Last reply 3 weeks ago
OCR A-level Computer Science Paper 1 (H446/01) - 12th June 2023 [Exam Chat]Last reply 2 months ago
OCR GCSE Computer Science Paper 1 (J277/01) - 19th May 2023 [Exam Chat]Last reply 3 months ago
AQA GCSE Computer Science Paper 2 (8525/2) - 25th May 2023 [Exam Chat]Last reply 5 months ago
AQA GCSE Computer Science Paper 1 (8525/1A, 1B, 1C) - 19th May 2023 [Exam Chat]Last reply 5 months ago
AQA Computer Science NEA and Computer science paper 1 questionLast reply 1 week ago
OCR A-level Computer Science Paper 2 (H446/02) - 19th June 2023 [Exam Chat]Last reply 2 weeks ago
AQA A-level Computer Science Paper 1 (7517 1A - 1E) - 12th June 2023 [Exam Chat]Last reply 3 weeks ago
OCR A-level Computer Science Paper 1 (H446/01) - 12th June 2023 [Exam Chat]Last reply 2 months ago
OCR GCSE Computer Science Paper 1 (J277/01) - 19th May 2023 [Exam Chat]Last reply 3 months ago
AQA GCSE Computer Science Paper 2 (8525/2) - 25th May 2023 [Exam Chat]Last reply 5 months ago
AQA GCSE Computer Science Paper 1 (8525/1A, 1B, 1C) - 19th May 2023 [Exam Chat]Last reply 5 months ago
AQA Computer Science NEA and Computer science paper 1 question