0
**HELP ME**
Displays nimbers from 1 - 10000 which are divisible by 3 and 9 displays the status whether it is an odd number or an even number, with the display as follows: 9 -> odd 18 -> even 27 -> odd 36 -> even ... 9999 -> odd
6 Answers
+ 5
Hi Nafi'dhiya Pradhiasta,
I can help you but it's looking like your homework!! I don't know weather I am right or not. But I can give you hints.
Create a function ,which check number is divisible by 3-9 ,which returns true or false. Run a for loop from 1-10000 ,use your function inside loop by creating if condition and else easy part.
NOTE : Show your attempts! because you can be perfect by removing your mistakes đ
+ 1
for i in range(10001):
if ....:
print(....)
elif....:
print(...)
else:
print(...)
+ 1
for x in range(9, 10000, 9):
print(f"{x} ->", end=" ")
if x % 2: print("odd")
else print("even")
# Hope this helps
+ 1
ayo thankyou very much that's more than enough Shadoff Calvin Thomas
0
Your try first!!
0
Nafi'dhiya Pradhiasta You're welcome.