Fundamentals Of Programing at Addis Ababa Science & Technology University | Flashcards & Summaries

Lernmaterialien für fundamentals of programing an der Addis Ababa Science & Technology University

Greife auf kostenlose Karteikarten, Zusammenfassungen, Übungsaufgaben und Altklausuren für deinen fundamentals of programing Kurs an der Addis Ababa Science & Technology University zu.

TESTE DEIN WISSEN

You are developing an application that includes a class named Order. The application will store a collection of Order objects.
The collection must meet the following requirements:
✑ Use strongly typed members.
✑ Process Order objects in first-in-first-out order.
✑ Store values for each Order object.
✑ Use zero-based indices.
You need to use a collection type that meets the requirements.
Which collection type should you use?

Lösung anzeigen
TESTE DEIN WISSEN

Queue<T>

Lösung ausblenden
TESTE DEIN WISSEN

You are developing an application. The application includes a method named ReadFile that reads data from a file.
The ReadFile() method must meet the following requirements:
✑ It must not make changes to the data file.
✑ It must allow other processes to access the data file.
✑ It must not throw an exception if the application attempts to open a data file that does not exist.
You need to implement the ReadFile() method.
Which code segment should you use?

Lösung anzeigen
TESTE DEIN WISSEN

var fs = File.Open(Filename, FileMode.OpenOrCreate, FileAccess.Read,FileShare.ReadWrite);

Lösung ausblenden
TESTE DEIN WISSEN

You are creating a console application by using C#.
You need to access the application assembly.
Which code segment should you use?

Lösung anzeigen
TESTE DEIN WISSEN

Assembly.GetAssembly(this);

Lösung ausblenden
TESTE DEIN WISSEN

Pandas - Further Key points DataFrames

Lösung anzeigen
TESTE DEIN WISSEN
  • It possible to print the dataframe (still shows too many lines, might be too “noisy”).

  • head() and tail() print the n top and bottom, respectively, lines of the dataframe.

  • Count returns the number of entries for each column that are not null.

  • Info returns the number of entries, the number of columns, their counts and the data type.

  • Describe returns basic statistical information of the numeric columns.

Lösung ausblenden
TESTE DEIN WISSEN

Pandas: Key points Series 

Lösung anzeigen
TESTE DEIN WISSEN
  • Each series has only one data type (even if it is a more inclusive one, like object).

  • A list of indexes might be used (it has to have the same dimension).
  • It is possible to use dictionaries to create series.

Lösung ausblenden
TESTE DEIN WISSEN

Pandas - DataFrames - Keypoints

Lösung anzeigen
TESTE DEIN WISSEN
  • DataFrames may be seen as a tabular structure (named rows and columns).

  • We can define the indexes and columns as we create the dataframe.

  • It possible to take advantage of dictionaries and Series to create DataFrames.

  • To add the new columns of data it is not necessary to create a new dataframe.

Lösung ausblenden
TESTE DEIN WISSEN

24) What is Multidimensional Arrays


Lösung anzeigen
TESTE DEIN WISSEN

An array with more than one index value is called a multidimensional array. To declare a multidimensional array you can do follow syntax

data type array_ name[ ] [ ] [ ]….;

Lösung ausblenden
TESTE DEIN WISSEN
Definition Moore‘s law.
Lösung anzeigen
TESTE DEIN WISSEN
In order to have fast computers it is important to have as many transistors as possible in a given area ( high density of transistors). In recent years we have observed that this density doubles in regular time frames - roughly doubled every two years. At the same time, this is called Moore‘s law. 
Lösung ausblenden
TESTE DEIN WISSEN
CPU - Central Processing Unit
Lösung anzeigen
TESTE DEIN WISSEN
  • Is the main chip in a computer and is responsible for carrying out all tasks. It Runs in a constant loop and tells all the other components in the computer what to do. —> Typical construction is to add or subtract number.
  • CPU‘s usually have clock frequencies of around 2.5 to 3.5 GHz —> roughly 2.5 - 3.5. billion cycles per second.
Lösung ausblenden
TESTE DEIN WISSEN

22) List a few unconditional control statement in C.

Lösung anzeigen
TESTE DEIN WISSEN
  1.  break statement
  2.  continue statement
  3.  goto statement
  4. exit() function
Lösung ausblenden
TESTE DEIN WISSEN
What do we need to design an extremely simple processor?
Lösung anzeigen
TESTE DEIN WISSEN
The Hardware features of this CPU are:
  • 4 Memory Slots of size 4 bits each
  • 2 Registers of size 4 bits each
  • An ALU that can Add and subtract
  • An instruction set with 5 instructions
    • Load from Memory address x (i.e., M [xx]) into register y (i.e., R[y]): 000 xx y
    • Store from R[x] into M[yy]: 001 x yy
    • Add the register contents and store the result in R[x]: 010 x
    • Subtract the contents of R[0] from R[1] and store the result in R[x]: 011 x
    • Store the 4-bit number nnnn into M[xx]: 100 nnnn xx
Lösung ausblenden
TESTE DEIN WISSEN
Add the numbers 7 and 9 into your CPU example
Lösung anzeigen
TESTE DEIN WISSEN
  • Store 7 into M[0]: 100 0111 00
  • Store 9 into M[1]: 100 1001 01
  • Load from M[0] to R[0]: 000 00 0
  • Load from M[1] to R[1]: 000 01 1
  • Add registers into R[0]: 010 0
  • Store result in M[2]: 001 0 10

Note that the encoding on this machine-level program is (and has to be) unique! This very important characteristic allow us to omit the formatting and wirte the program as one number string: 1000111001001001010000000000110100001010
Lösung ausblenden
  • 422 Karteikarten
  • 0 Studierende
  • 0 Lernmaterialien

Beispielhafte Karteikarten für deinen fundamentals of programing Kurs an der Addis Ababa Science & Technology University - von Kommilitonen auf StudySmarter erstellt!

Q:

You are developing an application that includes a class named Order. The application will store a collection of Order objects.
The collection must meet the following requirements:
✑ Use strongly typed members.
✑ Process Order objects in first-in-first-out order.
✑ Store values for each Order object.
✑ Use zero-based indices.
You need to use a collection type that meets the requirements.
Which collection type should you use?

A:

Queue<T>

Q:

You are developing an application. The application includes a method named ReadFile that reads data from a file.
The ReadFile() method must meet the following requirements:
✑ It must not make changes to the data file.
✑ It must allow other processes to access the data file.
✑ It must not throw an exception if the application attempts to open a data file that does not exist.
You need to implement the ReadFile() method.
Which code segment should you use?

A:

var fs = File.Open(Filename, FileMode.OpenOrCreate, FileAccess.Read,FileShare.ReadWrite);

Q:

You are creating a console application by using C#.
You need to access the application assembly.
Which code segment should you use?

A:

Assembly.GetAssembly(this);

Q:

Pandas - Further Key points DataFrames

A:
  • It possible to print the dataframe (still shows too many lines, might be too “noisy”).

  • head() and tail() print the n top and bottom, respectively, lines of the dataframe.

  • Count returns the number of entries for each column that are not null.

  • Info returns the number of entries, the number of columns, their counts and the data type.

  • Describe returns basic statistical information of the numeric columns.

Q:

Pandas: Key points Series 

A:
  • Each series has only one data type (even if it is a more inclusive one, like object).

  • A list of indexes might be used (it has to have the same dimension).
  • It is possible to use dictionaries to create series.

Mehr Karteikarten anzeigen
Q:

Pandas - DataFrames - Keypoints

A:
  • DataFrames may be seen as a tabular structure (named rows and columns).

  • We can define the indexes and columns as we create the dataframe.

  • It possible to take advantage of dictionaries and Series to create DataFrames.

  • To add the new columns of data it is not necessary to create a new dataframe.

Q:

24) What is Multidimensional Arrays


A:

An array with more than one index value is called a multidimensional array. To declare a multidimensional array you can do follow syntax

data type array_ name[ ] [ ] [ ]….;

Q:
Definition Moore‘s law.
A:
In order to have fast computers it is important to have as many transistors as possible in a given area ( high density of transistors). In recent years we have observed that this density doubles in regular time frames - roughly doubled every two years. At the same time, this is called Moore‘s law. 
Q:
CPU - Central Processing Unit
A:
  • Is the main chip in a computer and is responsible for carrying out all tasks. It Runs in a constant loop and tells all the other components in the computer what to do. —> Typical construction is to add or subtract number.
  • CPU‘s usually have clock frequencies of around 2.5 to 3.5 GHz —> roughly 2.5 - 3.5. billion cycles per second.
Q:

22) List a few unconditional control statement in C.

A:
  1.  break statement
  2.  continue statement
  3.  goto statement
  4. exit() function
Q:
What do we need to design an extremely simple processor?
A:
The Hardware features of this CPU are:
  • 4 Memory Slots of size 4 bits each
  • 2 Registers of size 4 bits each
  • An ALU that can Add and subtract
  • An instruction set with 5 instructions
    • Load from Memory address x (i.e., M [xx]) into register y (i.e., R[y]): 000 xx y
    • Store from R[x] into M[yy]: 001 x yy
    • Add the register contents and store the result in R[x]: 010 x
    • Subtract the contents of R[0] from R[1] and store the result in R[x]: 011 x
    • Store the 4-bit number nnnn into M[xx]: 100 nnnn xx
Q:
Add the numbers 7 and 9 into your CPU example
A:
  • Store 7 into M[0]: 100 0111 00
  • Store 9 into M[1]: 100 1001 01
  • Load from M[0] to R[0]: 000 00 0
  • Load from M[1] to R[1]: 000 01 1
  • Add registers into R[0]: 010 0
  • Store result in M[2]: 001 0 10

Note that the encoding on this machine-level program is (and has to be) unique! This very important characteristic allow us to omit the formatting and wirte the program as one number string: 1000111001001001010000000000110100001010
fundamentals of programing

Erstelle und finde Lernmaterialien auf StudySmarter.

Greife kostenlos auf tausende geteilte Karteikarten, Zusammenfassungen, Altklausuren und mehr zu.

Jetzt loslegen

Das sind die beliebtesten fundamentals of programing Kurse im gesamten StudySmarter Universum

Fundamentals of Computing

University of Newcastle-upon-Tyne

Zum Kurs
Programming fundamentals

Radboud University

Zum Kurs
Introduction to Programming Fundamentals

Radboud University

Zum Kurs
Fundamentals of Accounting 1 & 2

University of the East, Manila

Zum Kurs
Fundamentals of Programming

University of the City of Manila

Zum Kurs

Die all-in-one Lernapp für Studierende

Greife auf Millionen geteilter Lernmaterialien der StudySmarter Community zu
Kostenlos anmelden fundamentals of programing
Erstelle Karteikarten und Zusammenfassungen mit den StudySmarter Tools
Kostenlos loslegen fundamentals of programing