533 Week 6



Python can print message to use screen using a print() command

Now you make up a message:

The message can be personalized by means of a variable holding the name of the person.

Python can gather input from the user as well. Although I can't get it to work here, it would look just like this:

print("Enter your name:")

x = input()

print("Hello, " + x)

you can try it here:

Python program to print odd Numbers in given range

When you see the % symbol, you may think "percent". But in Python, as well as most other programming languages, it means something different.

The % symbol in Python is called the Modulo Operator. It returns the remainder of dividing the left hand operand by right hand operand. It's used to get the remainder of a division problem.

Also, != means not equal to.

#Now change the code so that it prints even numbers in a given range

Python program to print EVEN Numbers in given range

May have got you there.... The == operator compares the value or equality of two objects. This means you should use the equality operators == and !=, when comparing objects - which is technially what we are doing here.

Create your playground on
This playground was created on, our hands-on, knowledge-sharing platform for developers.
Go to
codingame x discord
Join the CodinGame community on Discord to chat about puzzle contributions, challenges, streams, blog articles - all that good stuff!
Online Participants