you will find here a number of questions and tasks that you should be around the middle of the second year computer science can answer or solve.
theory
- What is a dictionary in Python?
- What does the term "sequence" in Python? Give some examples.
- As defined a function in Python?
- What types of parameter passing it in Python?
- How can a Python function more as a value (parameter) or return?
- Give an example of a shortest possible function in Python to! What
- is a variable?
- What is "Duck Typing"?
- How are formed in Python for loops?
- What is a Python module? What modules are used?
- How can a (text) file be read?
- How to evaluate in Python command line parameters?
- What basic data types, you know? Also enter the memory requirements and the values range.
- What are the properties of an object? As is reflected back into the class?
- What control structures, you know?
- What is an array?
- Give an example of a one dimensional array in Java.
- How to initialize a one-dimensional array in Java?
- Give an example of a two dimensional array in Java.
- How to initialize a two-dimensional array in Java?
- Can we define a two-dimensional array in Java, which "is not rectangular (ie square: all the lines of equal length) is?
- enter an algorithm (without program details) in order to identify all elements of a one-dimensional arrays that meet a certain criteria (for example, is larger than a certain value).
- enter an algorithm (without program details) in order to identify all elements of a two-dimensional array, a particular Criterion is met.
- enter an algorithm (without program details) in order to determine the maximum of all values of a one-dimensional arrays.
- enter an algorithm (without program details) in order to determine the minimum of all values of a one-dimensional arrays.
- enter an algorithm (without program details) in order to determine the maximum of all values of a two-dimensional arrays.
- enter an algorithm (without program details) in order to determine the minimum of all values of a two-dimensional arrays.
- What is a function? Give an example in Java, including the use of the function.
- What is a method? Give an example in Java, including the use of the function.
- What is the difference between a variable of a basic data type and a variable of type class?
- What is a class?
- What is an object? Explain the relationship between object and class.
- What are Strings?
- How to compare strings?
- Why do you need comments?
- Why do you need coding standards?
- compare Java with Python.
- What should you remember the story "Shlemiel the Painter"?
- What must be done in principle (without program details), to read from a file? What
- must always be made (without program details), to write to a file?
- enter an algorithm (without program details) in order to identify all lines of a text file that a particular criterion (for example, contains a certain string) meet. What types of errors
- program (ier) do you know? How to find this error?
- How many have
main () methods musta Java class? How many can - main
()methods a Java class can have? - How many classes in a single Java file be implemented?
- What value does the variable
anInteger? Justify your answer!int anInteger = Integer . MAX_VALUE + a ;
- What is implicit or explicit cast? Name at least one example.
In this blog and also in the old blog It already has a number of tasks. Compare your answers with those of your classmates.
Here are a few "basic exercises "
- Create a Python program, which determines the maximum of a sequence. Do this, define a fixed test sequence with the following values
[- a , - 23 , - 2 , - 32 , - 89 , - 100 , - a , - 99 ]. Find additional sample test data. - you create a Python program, which determines the minimum of a sequence. Do this, define a fixed test sequence with the following values
[ a , 23 , 2 , 32 , 89 , 100 , a , 99 ]. Find additional sample test data. - you create a Java program, which determines the maximum of a sequence. Do this, define a fixed test sequence with the following values
[- a , - 23 , - 2 , - 32 , - 89 , - 100 , - a , - 99 ]. Find additional sample test data. - you create a Java program that calculates the minimum of a sequence. Do this, define a fixed test sequence with the following values
[ a , 23 , 2 , 32 , 89 , 100 , a , 99 ]. Find additional sample test data. - you create a Python program that determines the frequency of elements of a sequence (list). Do this, define a test sequence with the following values
[ a , 2 , - 3 , 4 , 2 , 1 , 10 , - 3 , 4 , 2 , 2 , 10 ] bzw. [ "hello" , "du" , "test" , "du" , "mouse" , "test" , "Test" ]. The result should be a list of different values, and how often they occur. - Consider the method
divide in the following program. translates into the program? If not corrected, then the error:
public class DivisionApp {
public static void main ( String [] args ) {
int result = divide ( 40 , 5);
system. out . println ( "Result:" + result);}
public static int divide ( int divident , int divisor ) {
if ( divisor > 0 ) {
; return divident / divisor ;
}
}
}
- following output should be created: one
3 5 7 9. Solve the problem- a
whileloop - using a
Thurs using - whileloop - a
forloop and using the modulo Operators using a -
forloop without the modulo operator
- a
- following output should be created: one
2 4 7 11 16 22 29 37. Solve the problem- a
Thurs using - whileloop - using a
forLoop
- a
- Write outputs a Java program that use a stack following values in reverse order:
23 21 20 18 17 13 11 5 3 - Write a Java program that use a queue following values in the same order prints:
23 21 20 18 17 13 11 5 3 - writing, you can use based on the last two examples of programs that are strings instead of integers.
0 comments:
Post a Comment