• Register

Recent questions tagged for-loop

0 votes
1 answer 2 views
Problem: How to do for loop in r in which the value of variable increments by 2
asked 1 day ago Ashty 1.7k points
0 votes
1 answer 4 views
Problem: My code is this : d = unifrnd (0,10,[10,1]); c = d.^(-2); a = round(unifrnd(0,1,[1,10]); e = a*c btotal = e+1 SIR = 1/btotal What I want is to iterate this function 1000 times, each time the value of SIR will vary due to the ... generated. For every iteration, I want the value of SIR to be added together (summed up), and in the end of the 1000th iteration, find the average SIR(mean).
asked 5 days ago Ashty 1.7k points
0 votes
1 answer 5 views
Problem : ERROR : Cell contents assignment to a non cell array object
asked 5 days ago Shovo210 3.1k points
0 votes
1 answer 15 views
Problem: runtimewarning: divide by zero encountered in double_scalars
asked Feb 16 Ethan ross 1.8k points
0 votes
1 answer 12 views
Problem: Hello programmers! I want to know how many times will the following loop be executed? for(int i = 0; i<= 100; i = i+2) Moreover, what will be the value of &lsquo;i&rsquo; when this loop terminates? I am a beginner so I am so confused.
asked Jan 19 Code Learner 6k points
0 votes
1 answer 24 views
Problem: My programming teacher gave us an assignment in which we have to tell which of the three loops in C++ does not have an entry condition? As far as my guess is concerned, the 'for' loop does not need an entry condition. I want you to guide me if I am wrong and tell me the correct answer to this question. Thanks!
asked Dec 17, 2020 Code Learner 6k points
0 votes
1 answer 6 views
Problem: Attention reader! Det hold of all the important Java and Collections concepts with theat a student-friendly price and become industry ready.Please write relevant answer if you find anything correct, or you want to share more information about the topic discussed above.
asked Dec 12, 2020 Mashhoodch 9.6k points
0 votes
1 answer 27 views
Problem: Hi there! I am new to the world of programming and learning loop constructs in C#. My concept for loops is clear but I just recently encountered a code somewhere in which for loop was initialized as follows: for(;;) { } I tried running that code, but it ... I make some mistake but I want to know more about &lsquo;for&rsquo; loops and all the possible ways in which it can be used. Thanks!
asked Nov 27, 2020 Code Learner 6k points
0 votes
1 answer 9 views
Problem: Hello When you know exactly how many times you want to loop through a block of code, use the for loop instead of a while loop: Statement 1 is executed (100 time) before the execution of the code block. Statement 2 defines the condition for executing the code block. Statement 3 is executed (every time) after the code block has been executed.
asked Nov 3, 2020 Mashhoodch 9.6k points
0 votes
1 answer 22 views
Problem: How can I break out of a for loop in C#? I am working with arrays in C# and want to break the loop when loop variabl encounters certain value. How can I do that? Please explain.
asked Oct 15, 2020 Code Learner 6k points
0 votes
1 answer 254 views
Problem: I am working with loops. My query is that can I increment a foor loop by 2? If yes, then how? Please explain in detail and with syntax and examples because I am a newbie and have no experience in programming. Thanks
asked Oct 15, 2020 Code Learner 6k points
0 votes
1 answer 117 views
I need help with the basics, I need to print 1 to100 numbers in python. Please explain with the help of an example.
asked Oct 10, 2020 Ahsan 1.8k points
0 votes
1 answer 37 views
Explain with an example?
asked Oct 8, 2020 jagruthi 680 points
0 votes
1 answer 44 views
I want to know how to sort an array in java without using sort method.
asked Sep 28, 2020 Daniel Anderson 4k points
0 votes
1 answer 42 views
We have obtain a full of data stored in tables via Mysql on which we have done few analysis and also export microsoft excel to create graphs and such however the customer demand it to be a desktop application.
asked Sep 26, 2020 Daniel Anderson 4k points
0 votes
1 answer 14 views
Problem: Hello kodlogs, I am learning the python basic concept but while working on the string I having a doubt like how can I able to append to the string in the loops, I am having the list. list = ["alpha","beta","gamma","delta"] And how can we in inside a for loop I need to end with this: final_string ="firstsecondkodlogs" So, how can I achieved this.
asked Jun 10, 2020 Gavin 15.3k points
0 votes
1 answer 48 views
Problem: Hello kodlogs, How can we use for loop in the python to iterate over the sequence of element I have a confusion over the range() function and the datatype like list, tuple and string. Like how can we access the elements in the list
asked Jun 9, 2020 Gavin 15.3k points