0% found this document useful (0 votes)
13 views3 pages

Emma 1

The document discusses programming languages and their syntaxes and provides examples for 10 languages. It also discusses various programming paradigms including imperative, object-oriented, functional, declarative, event-driven, procedural, logic, aspect-oriented, concurrent, and reactive programming.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views3 pages

Emma 1

The document discusses programming languages and their syntaxes and provides examples for 10 languages. It also discusses various programming paradigms including imperative, object-oriented, functional, declarative, event-driven, procedural, logic, aspect-oriented, concurrent, and reactive programming.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

UNIVERSITY OF CAPE COAST

COLLEGE OF AGRICULTURE AND


NATURAL SCIENCE
SCHOOL OF PHYSICAL SCIENCES
DEPARTMENT OF COMPUTER SCIENCE
AND INFORMATION TECHNOLOGY

COURSE CODE: CSC 102


COURSE TITLE: PROGRAMMING
TECHNIQUE
NAME: ATOBRAH EMMANUEL MENSAH
INDEX NO: PS/CSC/23/0078
LECTURER’S NAME: ISAAAC ARMAH-
MENSAH
DATE: MAY 14,2024

QUESTIONS:
1. List 10 programming language. For each one add their
syntax
2. Find all the various programming paradigms.
ANSWER
Q1.Programming language and their syntax

1. Java
Public class HelloWord {public static void main(Striing[ ]args) {
System.out.printIn(“Hello, World!”);
}
}

2. JavaScript
Console.log(“Hello, World!”);

3. Python
Print (“Hello, World!”)

4. Php
echo “Hello, World!”;
?>

5. C++
Print (

6. C#
#include <iostream>
Int main ( ) {
Std: :cout << “Hello, World!” << std : :end1;
return 0;
}

7. Ruby
puts “Hello, World!”

8. Swift
print(“Hello, World!”)

9. Go
Package main
Import “fmt”

Func main ( ) {
Fmt.Print1n(“Hello, World!”)
}

10. Rust
Fn main( ) {
Priint1n!(“Hello, World!”);
}

Q2. Programming paradigms

There are several programming paradigms, including:


1. Imperative programming: Focuses on describing how to perform tasks, using
statements that change a program's state. Examples: C, Java, Python.

2. Object-Oriented programming (OOP): Organizes software design around objects


and their interactions, emphasizing modularity and reusability. Examples: Java, C++,
Python.

3. Functional programming: Emphasizes pure functions, immutability, and


recursion, focusing on the evaluation of expressions rather than changing state.
Examples: Haskell, Lisp, Scala.

4. Declarative programming: Focuses on specifying what the program should


accomplish, rather than how it should accomplish it. Examples: Prolog, SQL.

5. Event-driven programming: Programs respond to events or user interactions,


such as mouse clicks or key presses. Examples: JavaScript, Python (with GUI
libraries).

6. Procedural programming: Similar to imperative programming, but with a focus


on procedures and functions that perform specific tasks. Examples: C, Pascal.

7. Logic programming: Based on formal logic, using logical statements and rules to
solve problems. Examples: Prolog, Mercury.

8. Aspect-Oriented programming (AOP): Focuses on modularizing cross-cutting


concerns, such as error handling or security, across multiple objects and functions.
Examples: AspectJ, Spring AOP.

9. Concurrent programming: Deals with programming multiple threads or processes


that execute concurrently, improving responsiveness and performance. Examples:
Java (with concurrency libraries), Go.

10. Reactive programming: Focuses on handling asynchronous data streams and


events, using reactive frameworks like RxJava or ReactiveX.

Keep in mind that these paradigms are not mutually exclusive, and many
programming languages blend elements from multiple paradigms.

REFERENCE
* Google
* Chrome

You might also like