Creating code for printing values 1-10

R:
print(1:10)

for (v in 1:10){
  print(v)
  v<- v+1}

Python
while x < 11 :
    print(x)
    x = x + 1
   

for y in range(1, 11):
    print(y)

Comments