Answers
>
Python
>
Mentoring
>
Article
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
2018 Views
See similar Python Mentoring tutors
Related Python Mentoring answers
All answers ▸
What would you expect to be the output of the following code snippet: `a = [1, 2, 3]; b = a; b[1] = 4; print(a); print(b);`, and why?
Define a function that takes in the age of the user and adds it to an output sentence such as "You are ..... old".
Manually implement a function that finds the smallest value in a list of integers and print it.
[Exam style] Python is an interpreted language. Explain what this means and how interpreted languages differ from compiled languages.