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

1791 Views

See similar Python Mentoring tutors

Related Python Mentoring answers

All answers ▸

Implement a fibonacci function which calculates the nth number of the fibonacci sequence.


Write a simple number guessing game, give the user 3 tries to guess a number between 1 and 10


Create a python code to sum the number from 1 to 10.


Explain why creating a list of several instances of one element using something like my_list = [a] * 5 can result in strange behaviour


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