From 46896e0426e44668aeb9224dd6a63a30f787af3c Mon Sep 17 00:00:00 2001 From: archit669 Date: Thu, 1 Feb 2024 20:07:36 +0530 Subject: [PATCH 1/8] add code --- archit/hello.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 archit/hello.cpp diff --git a/archit/hello.cpp b/archit/hello.cpp new file mode 100644 index 0000000..1745a27 --- /dev/null +++ b/archit/hello.cpp @@ -0,0 +1,17 @@ +#include +using namespace std; + +int main(){ + int n; + + + + + cin >> n; + cout << "hello world" << endl; + return 0; + + + + +} \ No newline at end of file From 14e074e17a6cf9e5904fc6af14237f078129aa85 Mon Sep 17 00:00:00 2001 From: archit669 Date: Thu, 1 Feb 2024 20:14:27 +0530 Subject: [PATCH 2/8] formatted code --- archit/hello.cpp | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/archit/hello.cpp b/archit/hello.cpp index 1745a27..c3298d1 100644 --- a/archit/hello.cpp +++ b/archit/hello.cpp @@ -1,17 +1,8 @@ -#include -using namespace std; +#include -int main(){ +int main() { int n; - - - - - cin >> n; - cout << "hello world" << endl; + std::cin >> n; + std::cout << "hello world" << std::endl; return 0; - - - - } \ No newline at end of file From 0c8ae23aff0f0db633ce4a8801b72ad755f7c4ab Mon Sep 17 00:00:00 2001 From: archit669 Date: Thu, 1 Feb 2024 20:28:12 +0530 Subject: [PATCH 3/8] add code --- archit/file.py | 53 ++++++++++++++++++++++++++++++++++++++++++++++++ archit/hello.cpp | 8 -------- 2 files changed, 53 insertions(+), 8 deletions(-) create mode 100644 archit/file.py delete mode 100644 archit/hello.cpp diff --git a/archit/file.py b/archit/file.py new file mode 100644 index 0000000..46481b9 --- /dev/null +++ b/archit/file.py @@ -0,0 +1,53 @@ +import random + +guesses_made = 0 +name = input("Hello! What is your name?\n") + +number = random.randint(1, 20) +print(f"Well, {name}, I am thinking of a number between 1 and 20.") + +while guesses_made < 6: + guess = int(input("Take a guess: ")) + guesses_made += 1 + + if guess < number: + print("Your guess is too low.") + + if guess > number: + print("Your guess is too high.") + + if guess == number: + break + +if guess == number: + print( + f"Good job, {name}! You guessed my number in {guesses_made} guesses! But this line is way too long!" + ) +else: + print("Nope. The number I was thinking of was {number}") + +guesses_made = 0 +name = input("Hello! What is your name?\n") + +number = random.randint(1, 20) +print(f"Well, {name}, I am thinking of a number between 1 and 20.") + +while guesses_made < 6: + guess = int(input("Take a guess: ")) + guesses_made += 1 + + if guess < number: + print("Your guess is too low.") + + if guess > number: + print("Your guess is too high.") + + if guess == number: + break + +if guess == number: + print( + f"Good job, {name}! You guessed my number in {guesses_made} guesses! But this line is way too long!" + ) +else: + print("Nope. The number I was thinking of was {number}") \ No newline at end of file diff --git a/archit/hello.cpp b/archit/hello.cpp deleted file mode 100644 index c3298d1..0000000 --- a/archit/hello.cpp +++ /dev/null @@ -1,8 +0,0 @@ -#include - -int main() { - int n; - std::cin >> n; - std::cout << "hello world" << std::endl; - return 0; -} \ No newline at end of file From 2f15d5774cab155929510ce5c7c80b8e11d0db30 Mon Sep 17 00:00:00 2001 From: archit669 Date: Thu, 1 Feb 2024 20:33:59 +0530 Subject: [PATCH 4/8] add files --- archit/file.py | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/archit/file.py b/archit/file.py index 46481b9..1244473 100644 --- a/archit/file.py +++ b/archit/file.py @@ -6,32 +6,6 @@ number = random.randint(1, 20) print(f"Well, {name}, I am thinking of a number between 1 and 20.") -while guesses_made < 6: - guess = int(input("Take a guess: ")) - guesses_made += 1 - - if guess < number: - print("Your guess is too low.") - - if guess > number: - print("Your guess is too high.") - - if guess == number: - break - -if guess == number: - print( - f"Good job, {name}! You guessed my number in {guesses_made} guesses! But this line is way too long!" - ) -else: - print("Nope. The number I was thinking of was {number}") - -guesses_made = 0 -name = input("Hello! What is your name?\n") - -number = random.randint(1, 20) -print(f"Well, {name}, I am thinking of a number between 1 and 20.") - while guesses_made < 6: guess = int(input("Take a guess: ")) guesses_made += 1 From 556f9d018de68a144628e4ae801aff68e4c29397 Mon Sep 17 00:00:00 2001 From: archit669 Date: Thu, 1 Feb 2024 20:37:21 +0530 Subject: [PATCH 5/8] add files --- archit/file.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/archit/file.py b/archit/file.py index 1244473..f891c4f 100644 --- a/archit/file.py +++ b/archit/file.py @@ -24,4 +24,5 @@ f"Good job, {name}! You guessed my number in {guesses_made} guesses! But this line is way too long!" ) else: - print("Nope. The number I was thinking of was {number}") \ No newline at end of file + print("Nope. The number I was thinking of was {number}") + \ No newline at end of file From e1872565ead38ea9cd2fc3723013a176c3bbfcee Mon Sep 17 00:00:00 2001 From: archit669 Date: Thu, 1 Feb 2024 20:50:58 +0530 Subject: [PATCH 6/8] add files --- archit/{file.py => guess_number_fixed.py} | 3 +-- archit/guess_number_nolint.py | 25 +++++++++++++++++++++++ archit/pyproject.toml | 18 ++++++++++++++++ 3 files changed, 44 insertions(+), 2 deletions(-) rename archit/{file.py => guess_number_fixed.py} (90%) create mode 100644 archit/guess_number_nolint.py create mode 100644 archit/pyproject.toml diff --git a/archit/file.py b/archit/guess_number_fixed.py similarity index 90% rename from archit/file.py rename to archit/guess_number_fixed.py index f891c4f..1244473 100644 --- a/archit/file.py +++ b/archit/guess_number_fixed.py @@ -24,5 +24,4 @@ f"Good job, {name}! You guessed my number in {guesses_made} guesses! But this line is way too long!" ) else: - print("Nope. The number I was thinking of was {number}") - \ No newline at end of file + print("Nope. The number I was thinking of was {number}") \ No newline at end of file diff --git a/archit/guess_number_nolint.py b/archit/guess_number_nolint.py new file mode 100644 index 0000000..8459fb5 --- /dev/null +++ b/archit/guess_number_nolint.py @@ -0,0 +1,25 @@ +import random + +guesses_made = 0 +name = input("Hello! What is your name?\n") + +number = random.randint(1, 20) +print(f"Well, {name}, I am thinking of a number between 1 and 20.") + +while guesses_made < 6: + guess = int(input("Take a guess: ")) + guesses_made += 1 + + if guess < number: + print("Your guess is too low.") + + if guess > number: + print("Your guess is too high.") + + if guess == number: + break + +if guess == number: + print(f"Good job, {name}! You guessed my number in {guesses_made} guesses! But this line is way too long!") +else: + print(f"Nope. The number I was thinking of was {number}") \ No newline at end of file diff --git a/archit/pyproject.toml b/archit/pyproject.toml new file mode 100644 index 0000000..20eb46e --- /dev/null +++ b/archit/pyproject.toml @@ -0,0 +1,18 @@ +[tool.black] +exclude = ''' +/( + \.eggs + | \.git + | \.hg + | \.mypy_cache + | \.tox + | \.venv + | _build + | buck-out + | build + | dist +)/ +''' +include = '\.pyi?$' +line-length = 88 +target-version = ['py36', 'py37', 'py38'] \ No newline at end of file From 73e1d8e7b5571b9b5a3916203f6cd12a838e348c Mon Sep 17 00:00:00 2001 From: Abhay Chauhan <79973672+thoughtlessnerd@users.noreply.github.com> Date: Thu, 1 Feb 2024 20:56:35 +0530 Subject: [PATCH 7/8] Delete archit/guess_number_nolint.py --- archit/guess_number_nolint.py | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 archit/guess_number_nolint.py diff --git a/archit/guess_number_nolint.py b/archit/guess_number_nolint.py deleted file mode 100644 index 8459fb5..0000000 --- a/archit/guess_number_nolint.py +++ /dev/null @@ -1,25 +0,0 @@ -import random - -guesses_made = 0 -name = input("Hello! What is your name?\n") - -number = random.randint(1, 20) -print(f"Well, {name}, I am thinking of a number between 1 and 20.") - -while guesses_made < 6: - guess = int(input("Take a guess: ")) - guesses_made += 1 - - if guess < number: - print("Your guess is too low.") - - if guess > number: - print("Your guess is too high.") - - if guess == number: - break - -if guess == number: - print(f"Good job, {name}! You guessed my number in {guesses_made} guesses! But this line is way too long!") -else: - print(f"Nope. The number I was thinking of was {number}") \ No newline at end of file From d24df426f83fc987a67b709b64550db1f0461f79 Mon Sep 17 00:00:00 2001 From: Abhay Chauhan <79973672+thoughtlessnerd@users.noreply.github.com> Date: Thu, 1 Feb 2024 20:57:24 +0530 Subject: [PATCH 8/8] Update guess_number_fixed.py --- archit/guess_number_fixed.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/archit/guess_number_fixed.py b/archit/guess_number_fixed.py index 1244473..8e91eec 100644 --- a/archit/guess_number_fixed.py +++ b/archit/guess_number_fixed.py @@ -24,4 +24,4 @@ f"Good job, {name}! You guessed my number in {guesses_made} guesses! But this line is way too long!" ) else: - print("Nope. The number I was thinking of was {number}") \ No newline at end of file + print("Nope. The number I was thinking of was {number}")