How would you get a piece of code to print the numbers 1 to 10

(Best) Create a loop:for loop with the range() or assigning a variable iwhile loop with variable(Okay) Create a function that prints 1 to 10(Least) Manually write it out

TD
Answered by Tutor604297 D. Python tutor

1006 Views

See similar Python Mentoring tutors

Related Python Mentoring answers

All answers ▸

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


Write a recursive function to find the factorial of a number n.


[Student query] Why do we import libraries/modules such as Numpy and Matplotlib into Python?


Whats is the difference between a function and a procedure?


We're here to help

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

© MyTutorWeb Ltd 2013–2025

Terms & Conditions|Privacy Policy
Cookie Preferences