1.
DATE.VARIABILE.EXPRESII
2.
Avantajul limbajului pseudocod consta in:
Correct Answer
B. Nu este legat de o anumita sintaxa
Explanation
The advantage of pseudocode is that it is not tied to a specific syntax. This means that it can be easily understood and interpreted by humans without the need for a computer to execute it. Pseudocode allows programmers to focus on the logic and algorithmic thinking behind a solution, rather than getting caught up in the details of a particular programming language. It provides a flexible and abstract way of describing a solution, which can then be implemented in any programming language.
3.
In cadrul unui algoritm intalnim urmatoarele tipuri de date:
Correct Answer(s)
A. De intrare/ de iesire
B. Constante / variabile
Explanation
The given answer is correct because it accurately identifies the types of data encountered in an algorithm. "De intrare/ de iesire" refers to input and output data, which are the data that are received and produced by the algorithm. "Constante / variabile" refers to constants and variables, which are used to store and manipulate data within the algorithm. These types of data are commonly encountered in algorithm design and implementation.
4.
Tipul numeric poate sa contina constante sau variabile care sunt:
Correct Answer
D. Numere intregi ( cu sau fara semn) si numere reale (ca nr rationale cu nr finit de zecimale)
Explanation
The correct answer is that a numeric type can contain integers (with or without a sign) and real numbers (as rational numbers with a finite number of decimal places).
5.
In cadrul unei expresii formata din operanzi si operatori , operatorii sunt cei care desemneaza operatiille care se executa asupra operanzilor. Principalele categorii de operatori sunt:
Correct Answer(s)
A. Aritmetici
D. Logici
E. Relationali
Explanation
The correct answer is aritmetici, logici, relationali. In an expression, operators are the symbols that indicate the operations to be performed on the operands. The given categories of operators - aritmetici (arithmetic), logici (logical), and relationali (relational) - represent different types of operations that can be performed in an expression. Aritmetici operators are used for mathematical calculations, logici operators are used for logical operations such as AND, OR, NOT, and relationali operators are used for comparisons between operands.
6.
Stabiliti care din urmatoarele expresii calculeaza media aritmetica a numerelor intregi memorate in variabilele x si y :
Correct Answer
D. (x+y)/2
Explanation
The expression (x+y)/2 calculates the arithmetic mean of the integers stored in variables x and y. It adds the values of x and y together and then divides the sum by 2. This will give the average of the two numbers.
7.
Care este instructiunea pseudocod care are ca rezultat numarul obtinut prin inversarea ordinii cifrelor numarului natural format din exact 2 cifre, memorat in variabila y ?
Correct Answer
A. Y%10*10+[y/10]
Explanation
The correct answer is y%10*10+[y/10]. This pseudocode instruction calculates the number obtained by reversing the order of the digits in the natural number y, which has exactly 2 digits. It does so by taking the remainder of y divided by 10 (y%10), which gives the last digit, multiplying it by 10, and then adding the result of y divided by 10 ([y/10]), which gives the first digit. This operation effectively swaps the positions of the two digits in y, resulting in the reversed number.
8.
Stiind ca N este o variabila intreaga ce memoreaza un numar natural, precizati cum poate fi scrisa in pseudocod conditia va valoarea lui N sa fie numar natural par din intervalul [1;50].
Correct Answer
C. (n>=1 and n
9.
Rezulatul evaluarii expresiei NOT(a<-1 AND a<=1) pentru o valoare a variabilei a=0.5 este:
Correct Answer
A. TRUE
Explanation
The expression "NOT(a
10.
Operatorul % da _________ impartirii a doua numere intregi.
Correct Answer
restul
rest
REST
Rest
Explanation
The correct answer for this question is "restul, rest, REST, Rest". The question is asking for the result of the % operator when applied to two integers. The % operator, also known as the modulus operator, returns the remainder of the division of the two numbers. In this case, the answer options are all variations of the word "rest" which accurately represent the concept of the remainder in the context of integer division.
11.
O ____________ este formata din unul sau mai multi operanzi asupra carora actioneaza operatori.
Correct Answer
expresie
EXPRESIE
expresia
EXPRESIA
Explanation
The correct answer is "expresie, EXPRESIE, expresia, EXPRESIA". The question is asking for the correct forms of the word "expresie" in both lowercase and uppercase. The word "expresie" is a noun in Romanian, meaning "expression" in English. The correct forms of the word in both lowercase and uppercase are "expresie" and "EXPRESIE" respectively. The other options provided are variations of the correct forms.
12.
Pentru doua numere reale a si b scrieti o expresie care calculeaza suma dintre media aritmetica si media geometrica a celor doua numere.(ATENTIE! Nu lasati spatii libere intre caractere atunci cand scrieti expresia)
Correct Answer
(a+b)/2.0+sqrt(a*b)
(a+b)/2+sqrt(a*b)
Explanation
The correct answer is (a+b)/2.0+sqrt(a*b) or (a+b)/2+sqrt(a*b). Both expressions correctly calculate the sum of the arithmetic mean and the geometric mean of the two real numbers a and b. The first expression uses the decimal point to ensure that the division is performed as a floating-point division, while the second expression performs the division as an integer division. Both expressions then add the square root of the product of a and b to the result.
13.
Pentru ca o succesiune de pasi in rezolvarea unei probleme sa devina algoritm, acesta trebuie sa respecte urmatoarele conditii:
Correct Answer(s)
A. Finititudine
B. Realizabilitate
C. Eficienta
D. Universalitate
F. Claritate
Explanation
The given answer lists the conditions that must be met for a sequence of steps in problem-solving to become an algorithm. These conditions are finiteness, realizability, efficiency, universality, and clarity. Finiteness means that the algorithm must have a finite number of steps. Realizability refers to the ability to actually carry out the steps in practice. Efficiency means that the algorithm should be able to solve the problem in a reasonable amount of time. Universality implies that the algorithm can be applied to different instances of the same problem. Clarity means that the steps of the algorithm should be clear and unambiguous.
14.
Metodele de implementare ale unui algoritm pot fi:
Correct Answer(s)
C. Schema logica
D. Pseudocodul
E. Limbajul de programare
Explanation
The correct answer includes three methods of implementing an algorithm: logical schema, pseudocode, and programming language. These methods provide different ways to represent and describe the steps of an algorithm. A logical schema is a visual representation of the algorithm using symbols and diagrams. Pseudocode is a simplified and informal language that describes the algorithm using a combination of natural language and programming constructs. Programming language refers to actually writing the algorithm using a specific programming language, such as Python or Java. These methods allow for different levels of abstraction and can be used in different stages of algorithm development.
15.
Care este valoarea expresiei :4000/10/10*2+4*10*10/2
Correct Answer
B. 280.0
Explanation
The expression can be simplified by following the order of operations (PEMDAS/BODMAS). First, we divide 4000 by 10 which equals 400. Then, we divide 400 by 10 which equals 40. Next, we multiply 40 by 2 which equals 80. Moving on, we multiply 4 by 10 which equals 40, and then multiply 10 by 10 which equals 100. Finally, we divide 100 by 2 which equals 50. Adding the previous results, we get 80 + 40 + 50 = 170. Therefore, the correct answer is 280.0.
16.
In pseudocod, pentru a calcula catul impartirii intregi a lui x la y se va folosi operatorul:
Correct Answer
B. DIV sau /
Explanation
The correct answer is "DIV sau /". In pseudocode, the operator "DIV" or "/" is used to calculate the quotient of the integer division of x by y. This operator performs the division and discards the decimal part, returning only the whole number quotient.
17.
Pentru a afla daca numarul N este par vom folosi una din variantele:
Correct Answer
C. N MOD 2 =0
Explanation
The correct answer is N MOD 2 = 0. This expression checks if the remainder of dividing N by 2 is equal to 0. If the remainder is 0, it means that N is divisible by 2 and therefore an even number.
18.
Rezultatul evaluarii expresiei N%10 pentru N=12345 este:
Correct Answer
C. 5
Explanation
The expression N%10 calculates the remainder when N is divided by 10. In this case, N is 12345. When 12345 is divided by 10, the remainder is 5. Therefore, the result of the expression N%10 for N=12345 is 5.
19.
Care este valoarea expresiei:20 div 10 * 2+30 div 15 * 2
Correct Answer
C. 8
Explanation
The expression can be simplified by following the order of operations (PEMDAS/BODMAS). First, we perform the division operations: 20 divided by 10 equals 2, and 30 divided by 15 equals 2. Then, we multiply the results: 2 multiplied by 2 equals 4. Finally, we add the two products: 4 plus 4 equals 8. Therefore, the value of the expression is 8.