How would you write a while loop to print all even numbers from 1-10?

i = 2while i <= 10: print(i) i += 2

CL
Answered by Chantelle L. Python tutor

1717 Views

See similar Python Mentoring tutors

Related Python Mentoring answers

All answers ▸

Sort a given input of lowercase letters alphabetically


Print "Hello World!" ten times without typing (or pasting) the print function more than once


Using the shared code editor, write a recursive function for calculating a factorial of an input parameter.


Write a function that takes a string, and outputs that string formatted in camelcase. (alternating upper and lower case for each character, e.g. cAmElCaSe)


We're here to help

contact us iconContact ustelephone icon+44 (0) 203 773 6020
Facebook logoInstagram logoLinkedIn logo

MyTutor is part of the IXL family of brands:

© 2026 by IXL Learning