1. What is the output of the given code? for num in 1…5 puts num end a) 1 2 3 4 5 b) 1 2 3 4 c) 2 3 4 5 d) None of the mentioned AnswerAnswer: b [Reason:] As the range i.e 1…10 is exclusive the loop will loop till 4 and then…
1. What is the output of the given code? for num in 1…5 puts num end a) 1 2 3 4 5 b) 1 2 3 4 c) 2 3 4 5 d) None of the mentioned AnswerAnswer: b [Reason:] As the range i.e 1…10 is exclusive the loop will loop till 4 and then…