Skip to content

Rawan Al riyad #9

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions app.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
newgit() {
return true;
}
3 changes: 3 additions & 0 deletions quiz/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# https://dart.dev/guides/libraries/private-files
# Created by `dart pub`
.dart_tool/
3 changes: 3 additions & 0 deletions quiz/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## 1.0.0

- Initial version.
2 changes: 2 additions & 0 deletions quiz/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
A sample command-line application with an entrypoint in `bin/`, library code
in `lib/`, and example unit test in `test/`.
30 changes: 30 additions & 0 deletions quiz/analysis_options.yaml
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
12 changes: 12 additions & 0 deletions quiz/bin/fifth_question.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import 'dart:io';

fifthQuestion({required int counter}) {
print(" git add . adds / stages all of the files in the current directory ?");
String? answer1 = stdin.readLineSync();
if (answer1 == "true") {
print(" right answer ");
counter++;
} else {
print(" wrong answer ");
}
}
12 changes: 12 additions & 0 deletions quiz/bin/first_qeustion.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import 'dart:io';

firstQuestion({required int counter}) {
print(" GitHub is a web-based Git repository hosting service ?");
String? answer1 = stdin.readLineSync();
if (answer1 == "true") {
print(" right answer ");
counter++;
} else {
print(" wrong answer ");
}
}
13 changes: 13 additions & 0 deletions quiz/bin/forth_qeustion.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import 'dart:io';

forthtQuestion({required int counter}) {
print(" is this a commad line for git push ");
print(" git commit -m 1234 ");
String? answer4 = stdin.readLineSync();
if (answer4 == "false") {
print(" right answer ");
counter++;
} else {
print(" wrong answer ");
}
}
25 changes: 25 additions & 0 deletions quiz/bin/quiz.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import 'first_qeustion.dart';
import 'fifth_question.dart';
import 'forth_qeustion.dart';
import 'second_qeustion.dart';
import 'thired_question.dart';

void main(List<String> args) {
int counter = 0;
print("Welcome!");
print("This is a simple quiz app designed to test your knowledge of Git and GitHub are you ready ! ");
print("write true or false");
firstQuestion(counter: counter);
print("\n");
secondquestion(counter: counter);
print("\n");
thirdQuestion(counter: counter);
print("\n");
forthtQuestion(counter: counter);
print("\n");
fifthQuestion(counter: counter);
if (counter > 3) {
print("Congratulations you passed");
}
print("you faild");
}
13 changes: 13 additions & 0 deletions quiz/bin/second_qeustion.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import 'dart:io';

secondquestion({required int counter}) {
print(
" GitHub is a distributed version control system for tracking changes in source code during software development ?");
String? answer2 = stdin.readLineSync();
if (answer2 == "false") {
print(" right answer ");
counter++;
} else {
print(" wrong answer ");
}
}
13 changes: 13 additions & 0 deletions quiz/bin/thired_question.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import 'dart:io';

thirdQuestion({required int counter}) {
print(
" Git push allows us to transfer files from the local repository to remote repository hosting services like GitHub");
String? answer3 = stdin.readLineSync();
if (answer3 == "true") {
print(" right answer ");
counter++;
} else {
print(" wrong answer ");
}
}
3 changes: 3 additions & 0 deletions quiz/lib/quiz.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
int calculate() {
return 6 * 7;
}
Loading