Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assignment 3 of 4 Completed - Joel Jojo #56

Open
wants to merge 26 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
0484757
Solution for Program No. 1
JoelJojoP Jan 10, 2022
40612f7
Solution for Program 1 updated
JoelJojoP Jan 11, 2022
955144a
Solution for Program 2 updated
JoelJojoP Jan 11, 2022
d388b22
Solution for Program 3 updated
JoelJojoP Jan 11, 2022
464d3c7
Solution for Program 4 updated
JoelJojoP Jan 11, 2022
7daf2f2
Screenshots of outputs for program 1 updated
JoelJojoP Jan 13, 2022
c7bcbaf
Screenshots of outputs for program 2 updated
JoelJojoP Jan 13, 2022
0d92544
Screenshots of outputs for program 3 updated
JoelJojoP Jan 13, 2022
e039e37
Screenshots of outputs for program 4 updated
JoelJojoP Jan 13, 2022
d5fcf75
Merge branch 'IRIS-NITK:master' into master
JoelJojoP Jan 17, 2022
d48f4d2
Number Fact app v1.0.0 Updated
JoelJojoP Jan 19, 2022
4e73350
Resized gif
JoelJojoP Jan 19, 2022
0581037
Number Fact v1.0 Updated
JoelJojoP Jan 19, 2022
5c4cdc8
Update README.md
JoelJojoP Jan 19, 2022
e146af4
Update README.md
JoelJojoP Jan 19, 2022
4929b9a
Updated icon for ios app
JoelJojoP Jan 19, 2022
94c7acd
Merge branch 'master' of https://github.com/JoelJojoP/IRIS-Flutter-Bo…
JoelJojoP Jan 19, 2022
f6b0178
Upraded app to v1.2.0
JoelJojoP Jan 21, 2022
b99f22f
Updated README.md for v1.2.0
JoelJojoP Jan 21, 2022
266ae69
Updated app to v1.3.0
JoelJojoP Jan 21, 2022
de38292
Updated README.md
JoelJojoP Jan 22, 2022
6521522
Merge branch 'IRIS-NITK:master' into master
JoelJojoP Jan 25, 2022
92ed1a5
Remind_Me app v1.0.0 updated
JoelJojoP Jan 30, 2022
80a1cff
Updated Remind Me app to v1.2.0
JoelJojoP Jan 31, 2022
c7d4a31
Updated Remind Me to v1.2.1:Fixed Minor Bug
JoelJojoP Feb 1, 2022
af81c4b
Moviez app without bloc added
JoelJojoP Feb 3, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 6 additions & 0 deletions session_1/assignments/Solution/program1_fibonacci/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Files and directories created by pub.
.dart_tool/
.packages

# Conventional directory for build output.
build/
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "program1_fibonacci",
"request": "launch",
"type": "dart",
"console": "terminal"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## 1.0.0

- Initial version.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
A simple command-line application.
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# This file configures the static analysis results for your project (errors,
# warnings, and lints).
#
# This enables the 'recommended' set of lints from `package:lints`.
# This set helps identify many issues that may lead to problems when running
# or consuming Dart code, and enforces writing Dart using a single, idiomatic
# style and format.
#
# If you want a smaller set of lints you can change this to specify
# 'package:lints/core.yaml'. These are just the most critical lints
# (the recommended set includes the core lints).
# The core lints are also what is used by pub.dev for scoring packages.

include: package:lints/recommended.yaml

# Uncomment the following section to specify additional rules.

# linter:
# rules:
# - camel_case_types

# analyzer:
# exclude:
# - path/to/excluded/files/**

# For more information about the core and recommended set of lints, see
# https://dart.dev/go/core-lints

# For additional information about configuring this file, see
# https://dart.dev/guides/language/analysis-options
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import 'dart:io';

void main(List<String> args) {
print("Enter the number of terms:");
int n = int.parse(stdin.readLineSync()!);
int t1 = 0;
int t2 = 1;
print("$t1\n$t2");
int t3;
for (var i = 2; i < n; i++) {
t3 = t1 + t2;
print("$t3");
t1 = t2;
t2 = t3;
}
}
12 changes: 12 additions & 0 deletions session_1/assignments/Solution/program1_fibonacci/pubspec.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Generated by pub
# See https://dart.dev/tools/pub/glossary#lockfile
packages:
lints:
dependency: "direct dev"
description:
name: lints
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.1"
sdks:
dart: ">=2.15.1 <3.0.0"
14 changes: 14 additions & 0 deletions session_1/assignments/Solution/program1_fibonacci/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: program1_fibonacci
description: A simple command-line application.
version: 1.0.0
# homepage: https://www.example.com

environment:
sdk: '>=2.15.1 <3.0.0'


# dependencies:
# path: ^1.8.0

dev_dependencies:
lints: ^1.0.0
6 changes: 6 additions & 0 deletions session_1/assignments/Solution/program2_semiprime/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Files and directories created by pub.
.dart_tool/
.packages

# Conventional directory for build output.
build/
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "program2_semiprime",
"request": "launch",
"type": "dart",
"console": "terminal"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## 1.0.0

- Initial version.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
A simple command-line application.
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# This file configures the static analysis results for your project (errors,
# warnings, and lints).
#
# This enables the 'recommended' set of lints from `package:lints`.
# This set helps identify many issues that may lead to problems when running
# or consuming Dart code, and enforces writing Dart using a single, idiomatic
# style and format.
#
# If you want a smaller set of lints you can change this to specify
# 'package:lints/core.yaml'. These are just the most critical lints
# (the recommended set includes the core lints).
# The core lints are also what is used by pub.dev for scoring packages.

include: package:lints/recommended.yaml

# Uncomment the following section to specify additional rules.

# linter:
# rules:
# - camel_case_types

# analyzer:
# exclude:
# - path/to/excluded/files/**

# For more information about the core and recommended set of lints, see
# https://dart.dev/go/core-lints

# For additional information about configuring this file, see
# https://dart.dev/guides/language/analysis-options
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import 'dart:io';

bool is_Prime(int n) {
if (n <= 1) {
return false;
} else {
for (var i = 2; i < n; i++) {
if (n % i == 0) {
return false;
}
}
return true;
}
}

bool is_Semiprime(int a) {
if (a <= 3) {
return false;
} else {
for (int i = 2; i < a; i++) {
if (a % i == 0) {
double t = a / i;
int f = t.floor();
if (is_Prime(i) && is_Prime(f)) {
return true;
}
}
}
return false;
}
}

void main(List<String> args) {
print("Enter a number:");
int x = int.parse(stdin.readLineSync()!);
if (is_Semiprime(x)) {
print("The number is semiprime");
} else {
print("The number is not semiprime");
}
}
12 changes: 12 additions & 0 deletions session_1/assignments/Solution/program2_semiprime/pubspec.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Generated by pub
# See https://dart.dev/tools/pub/glossary#lockfile
packages:
lints:
dependency: "direct dev"
description:
name: lints
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.1"
sdks:
dart: ">=2.15.1 <3.0.0"
14 changes: 14 additions & 0 deletions session_1/assignments/Solution/program2_semiprime/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: program2_semiprime
description: A simple command-line application.
version: 1.0.0
# homepage: https://www.example.com

environment:
sdk: '>=2.15.1 <3.0.0'


# dependencies:
# path: ^1.8.0

dev_dependencies:
lints: ^1.0.0
6 changes: 6 additions & 0 deletions session_1/assignments/Solution/program3_primearray/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Files and directories created by pub.
.dart_tool/
.packages

# Conventional directory for build output.
build/
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "program3_primearray",
"request": "launch",
"type": "dart",
"console": "terminal"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## 1.0.0

- Initial version.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
A simple command-line application.
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# This file configures the static analysis results for your project (errors,
# warnings, and lints).
#
# This enables the 'recommended' set of lints from `package:lints`.
# This set helps identify many issues that may lead to problems when running
# or consuming Dart code, and enforces writing Dart using a single, idiomatic
# style and format.
#
# If you want a smaller set of lints you can change this to specify
# 'package:lints/core.yaml'. These are just the most critical lints
# (the recommended set includes the core lints).
# The core lints are also what is used by pub.dev for scoring packages.

include: package:lints/recommended.yaml

# Uncomment the following section to specify additional rules.

# linter:
# rules:
# - camel_case_types

# analyzer:
# exclude:
# - path/to/excluded/files/**

# For more information about the core and recommended set of lints, see
# https://dart.dev/go/core-lints

# For additional information about configuring this file, see
# https://dart.dev/guides/language/analysis-options
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import 'dart:io';

bool is_Prime(num n) {
if (n <= 1) {
return false;
} else {
for (var i = 2; i < n; i++) {
if (n % i == 0) {
return false;
}
}
return true;
}
}

void main(List<String> args) {
print("Enter the number of elements:");
int x = int.parse(stdin.readLineSync()!);
var a = List.empty(growable: true);
a.length = x;
print("Enter the array elements:");
for (var i = 0; i < x; i++) {
a[i] = int.parse(stdin.readLineSync()!);
}
num s = 0;
for (var i = 0; i < x; i++) {
if (is_Prime(a[i])) {
s = s + a[i];
}
}
if (is_Prime(s)) {
print("The sum of prime elements is $s which is a prime number");
} else {
print("The sum of prime elements is $s which is not a prime number");
}
}
12 changes: 12 additions & 0 deletions session_1/assignments/Solution/program3_primearray/pubspec.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Generated by pub
# See https://dart.dev/tools/pub/glossary#lockfile
packages:
lints:
dependency: "direct dev"
description:
name: lints
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.1"
sdks:
dart: ">=2.15.1 <3.0.0"
14 changes: 14 additions & 0 deletions session_1/assignments/Solution/program3_primearray/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: program3_primearray
description: A simple command-line application.
version: 1.0.0
# homepage: https://www.example.com

environment:
sdk: '>=2.15.1 <3.0.0'


# dependencies:
# path: ^1.8.0

dev_dependencies:
lints: ^1.0.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Files and directories created by pub.
.dart_tool/
.packages

# Conventional directory for build output.
build/
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "program4_course_module",
"request": "launch",
"type": "dart",
"console": "terminal"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## 1.0.0

- Initial version.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
A simple command-line application.
Loading