Docsity

Fundamentals of Programming (Comprog 1): Introduction to Programming Concepts, Assignments of Computer science

Toggle sidebar
bg1
ACT-C 102 โ€“ FUNDAMENTALS OF
PROGRAMMING (Comprog 1)
Week #: 1 (What is computer programming?)
Activity/Exercise:
1. What are the benefits of computer programming in everyday life?
- the benefit of computer programming is that it involves activities such as analysis,
developing understanding, generating algorithms, verification of requirements of
algorithms including their correctness and resources consumption, and coding of
algorithms which through the process of designing and building an executable
computer program it will accomplish a specific computing result or to perform a
specific task to solve a problem.
2. What is the importance of computer programming? Explain in your own words.
- is important today because everything today is computerized. We need to
manipulate these computers and machines which do tasks so efficiently and
accurately. We use computer programming to harness that computing power.
Moreso, it is important for us to create software and applications that help computer
and mobile users to solve problems and aid in our daily life.
3. In your own opinion, how does computer programming help you in your everyday
life?
It makes our everyday life better and easier, because with these computer programs
we can perform a set of tasks once we define them clearly through programming.
Week #: 2 (Imperative and Declarative Programming Language)
Activity/Exercise:
1. In your own opinion, describe the difference between imperative and declarative
programming language.
- imperative programming - consists of commands for the computer to perform and
focuses on describing how a program operates and on how the problem should be
solved, which requires a detailed step-by-step guide.
- while, declarative programming is by describing what the program must accomplish
in terms of the problem domain, rather than describe how to accomplish
2. Give an example of programming language that is known to be imperative.
- C, C++, C#, and Java
3. Give an example of programming language that is known to be declarative.
- SQL, XQuery
pf2

Partial preview of the text

Download Fundamentals of Programming (Comprog 1): Introduction to Programming Concepts and more Assignments Computer science in PDF only on Docsity!

ACT-C 102 โ€“ FUNDAMENTALS OF

PROGRAMMING (Comprog 1)

Week #: 1 (What is computer programming?) Activity/Exercise:

  1. What are the benefits of computer programming in everyday life?
    • the benefit of computer programming is that it involves activities such as analysis, developing understanding, generating algorithms, verification of requirements of algorithms including their correctness and resources consumption, and coding of algorithms which through the process of designing and building an executable computer program it will accomplish a specific computing result or to perform a specific task to solve a problem.
  2. What is the importance of computer programming? Explain in your own words.
    • is important today because everything today is computerized. We need to manipulate these computers and machines which do tasks so efficiently and accurately. We use computer programming to harness that computing power. Moreso, it is important for us to create software and applications that help computer and mobile users to solve problems and aid in our daily life.
  3. In your own opinion, how does computer programming help you in your everyday life? It makes our everyday life better and easier, because with these computer programs we can perform a set of tasks once we define them clearly through programming. Week #: 2 (Imperative and Declarative Programming Language) Activity/Exercise:
  4. In your own opinion, describe the difference between imperative and declarative programming language.
    • imperative programming - consists of commands for the computer to perform and focuses on describing how a program operates and on how the problem should be solved, which requires a detailed step-by-step guide.
    • while, declarative programming is by describing what the program must accomplish in terms of the problem domain, rather than describe how to accomplish
  5. Give an example of programming language that is known to be imperative.
    • C, C++, C#, and Java
  6. Give an example of programming language that is known to be declarative.
    • SQL, XQuery

Week #: 3(Data Types) Activity/Exercise: 1.What are the difference between the given data types?

  • Stirng is for Alphanumeric characters, Integer for whole numbers, Floating point type fow numbers with decimal point, Character for encoding text numerically, Boolean for representing logical values.
  1. Define what is a data type in your own opinion.
  • is a classification that specifies which type of value a variable has and what type of mathematical, relational or logical operations can be applied to it without causing an error.
  1. Research about the other data type use in the programming language and define them.
  • date data type stores a calendar date with other programming information, Long data types are often 32- or 64-bit integers in code. nothing data type shows that a code has no value. the void type contains a value that the code cannot process and it tells a user that the code can't return a response. Week #: 4 (C++ Operators) Activiy/Exercises:
  1. Reasearch about the other operators in C++.
  • Conditional Operators, also known as Ternary Operator or ?: Operator. These are used for decision-making.
  1. Give at least 3 another C++ operator and define them.
  • assignment operators are used to assign values to variables, A relational operator is used to check the relationship between two operands, Logical operators are used to check whether an expression is true or false. If the expression is true, it returns 1 whereas if the expression is false, it returns 0.
  1. What is an operator in a programming? Why is it important in a programming language?
  • An operator in a programming language is a symbol that tells the compiler or interpreter to perform specific mathematical, relational or logical operation and produce final result. It is used for performing certain operations like arithmetical, logical, relational, etc. When a programmer wants to perform some type of mathematical operation then you have to use operators. The purpose of operators is mainly for mathematical and logical calculations.