সব বই

পেশাদার

1 Markets I: The Ecosystem and Exchange-Traded Marketsবাজার অনলাইন 2 Markets II: Rates, FX and Creditবাজার অনলাইন 3 Markets III: Commodities, Energy and Cryptoবাজার অনলাইন 4 Quantitative Methodsপদ্ধতি অনলাইন 5 Derivatives and Volatilityডেরিভেটিভস অনলাইন 6 Rates, Credit, XVA and Riskসুদহার, ঋণ ও ঝুঁকি অনলাইন 7 Research Craft: Predictors, Backtests, Measurement, Portfoliosগবেষণা অনলাইন 8 Strategies I: Equities and Futuresকৌশল অনলাইন 9 Strategies II: Volatility, Relative Value, Macro and the Bank Desksকৌশল অনলাইন 10 Microstructure and Executionএক্সিকিউশন অনলাইন 11 Market Making and High-Frequency Tradingমার্কেট মেকিং অনলাইন 12 Machine Learning for Marketsমেশিন লার্নিং অনলাইন 13 Low-Latency Softwareপ্রযুক্তি অনলাইন 14 Networks, Hardware and Trading Infrastructureপ্রযুক্তি অনলাইন 15 Research, Data and Risk Platformsপ্রযুক্তি অনলাইন 16 The Desk and the Firmপ্রতিষ্ঠান অনলাইন 17 The Industry: Firms, Roles and Careersক্যারিয়ার অনলাইন 18 Interviews I: Maths, Probability and Speedক্যারিয়ার অনলাইন 19 Interviews II: Markets, Trading Games and the Final Roundক্যারিয়ার অনলাইন 20 Interviews III: Codeক্যারিয়ার অনলাইন
অ্যাপ পরিচিতি Coach সাইন ইন পড়া শুরু করো

বইগুলো এখনো বাংলা ভাষায় পাওয়া যায় না — ইংরেজি সংস্করণ দেখানো হচ্ছে।

Computer Science · পরিভাষা

Loop কী?

Definition 10.2 Primary & Middle School Computer Science · অধ্যায় 10 — Algorithms: Repeat and Decide

A loop is a group of instructions that is carried out again and again: a given number of times (“repeat 4 times”), or until something happens (“repeat until the square ahead is a wall”).

The loop “repeat 4 times: forward, forward, turn left”. The robot starts on S, facing right, walks around a square and comes back to S, facing right again.
The loop “repeat 4 times: forward, forward, turn left”. The robot starts on S, facing right, walks around a square and comes back to S, facing right again.
“Repeat until the square ahead is a wall: forward”. The dark square is the wall.
“Repeat until the square ahead is a wall: forward”. The dark square is the wall.

উদাহরণ

Example 10.3 (Forward until the wall)

The robot stands on S, facing a wall somewhere ahead. The algorithm is:

repeat until the square ahead is a wall:
forward

Before each step, the robot checks the square ahead. Here it moves three times, then sees the wall and stops. With the wall one square further, the same algorithm would move four times: it works wherever the wall is.

Example 10.5 (A robot that finds its way)

The robot starts on S, facing right, on a grid with two walls. The algorithm is:

repeat until the robot is on the star:
if the square ahead is free then forward
otherwise turn left

A square is free if it is not a wall and is still on the grid: the edge of the grid counts as a wall. It moves forward three times; then the square ahead is a wall, so it turns left. It moves forward twice; the next square ahead is a wall again, so it turns left. Two more steps forward, and it is on the star: the loop stops, after 7 steps forward and 2 turns.

প্রসঙ্গসহ পড়ো →