Printing numbers 1 to 2
Write a program that print numbers 1 to 2 in the output
Write a program that print numbers 1 to 2 in the output
let msg = 'error' alert(msg)This answer is only visible to premium members
This answer is only visible to premium members
let msg = 'error' alert(msg)This answer is only visible to premium members
This answer is only visible to premium members
let msg = 'error' alert(msg)This answer is only visible to premium members
This answer is only visible to premium members
public class chap_yek_ta_sad { public static void main(String[] args) { for(int i = 1;i<=100;i++){ System.out.println(i); } } }
w = 1 while True: if w > 100: break else: print(w) w += 1
new = [] for i in range(1,101): new.append(i) else: print(new)
def a(m): print(m) if m == 1: return 1 return a(m-1) a(100)
for i in range(1,100): print(i)
print([ i for i in range(1,101)])
def print_numbers(start, end): lst_nums = [] while start <= end: lst_nums.append(start) start += 1 yield lst_nums print(f"List of numbers from 1 to 100: {next(print_numbers(1, 100))}")
Submitting answers is currently unavailable.
You must be logged in to access this section.
Login/Sign up If you don’t understand the exercise or can’t solve it for any reason, that’s completely
normal—don’t worry 😊
Try checking out easier exercises and reviewing different answers
submitted by others. Gradually, you can move on to more challenging exercises. Also, your answer
might be correct even if it’s different from others.