I want to create a function wich prints all numbers over 1000000.
So the user can input for example 500 and that dosent print but if you input 1005000 it prints.
My code far is.
v = [600,6300330,47, 1000001]
for x in v
if x >1000000:
print x
I want to create a function wich prints all numbers over 1000000.
So the user can input for example 500 and that dosent print but if you input 1005000 it prints.
My code far is.
v = [600,6300330,47, 1000001]
for x in v
if x >1000000:
print x
Code tags added.
I want to create a function wich prints all numbers over 1000000.
So the user can input for example 500 and that dosent print but if you input 1005000 it prints.My code far is.
v = [600,6300330,47, 1000001]
for x in v
if x >1000000:
print x
Since you did not state the problem, it is difficult to answer. After adding a colon on this line (was it an "illegal snytax error"?)
"for x in v"
it worked fine for me.
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.