Emma 1
Emma 1
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!”);
}
7. Logic programming: Based on formal logic, using logical statements and rules to
solve problems. Examples: Prolog, Mercury.
Keep in mind that these paradigms are not mutually exclusive, and many
programming languages blend elements from multiple paradigms.
REFERENCE
* Google
* Chrome