"""Prints a list of numbers that, when divided by 3, get 1 as a remainder, and, when divided by 4, will get 1 as a remainder.""" #if i divide by 3, there is a remainder of 1. #if i divide by 4, there is a remainder of 1. #Info: Code below is python 3. count = 0 listOfNumbers = [] while count <= 9000: #print(count % 3) #print(count % 4) #print(count) if count % 3 == 1 and count % 4 == 1: listOfNumbers.append(count) count += 1 print(listOfNumbers)
Run
Reset
Share
Import
Link
Embed
Language▼
English
中文
Python Fiddle
Python Cloud IDE
Follow @python_fiddle
Browser Version Not Supported
Due to Python Fiddle's reliance on advanced JavaScript techniques, older browsers might have problems running it correctly. Please download the latest version of your favourite browser.
Chrome 10+
Firefox 4+
Safari 5+
IE 10+
Let me try anyway!
url:
Go
Python Snippet
Stackoverflow Question