Declaration first, then initialization: “declare to reserve, initialize to avoid garbage”.
1D = one index (names, menor); 2D = two indices (precios: team × provider).
While is “check first”: normalize resp with Minusculas() so “SI” equals “si”.
When n hits MAX: stop writing by flipping resp to "no".
Index rule: increment first so the first team lands on index 1.
For = fixed 5; Repetir = keep asking until price > 0.
Start with provider 1 as “champion”; replace champion only when you find a smaller price.
Two loops = table: i makes rows, j makes columns; Sin Saltar keeps each row aligned.
While teams → validate 5 prices → compute min → ask continue → print table.
While vs Repetir for user input
| Structure | Condition check | Runs at least once |
|---|---|---|
| While | Before the body (pre-test) | No, if condition is false initially |
| Repetir...Hasta Que | After the body (post-test) | Yes, it executes once before checking |
Тествайте знанията си по Dairy Purchase Data Processing Course с 3 въпроса с множество отговори с подробни корекции.
1. What is the main purpose of declaring and initializing a variable before using it in PSeInt?
2. Why is it important to declare variables before using them in PSeInt, and what is the purpose of initializing variables after declaration?
Запомнете ключовите концепции на Dairy Purchase Data Processing Course с 9 интерактивни флашкарти.
Variable declaration — purpose?
Reserves memory and defines data type.
Variable declaration in PSeInt
Declares data type, reserves memory
Arrays in PSeInt — role?
Store multiple values with indices for teams, providers, etc.
Импортирайте курса си и AI генерира листове, тестове и флашкарти за 30 секунди.
Генератор на листове