Skip to content

Commit 22ed385

Browse files
committed
update oop lab for kattis-cli
1 parent c08df1a commit 22ed385

File tree

8 files changed

+54
-21
lines changed

8 files changed

+54
-21
lines changed

labs/oop/1.ans

Lines changed: 0 additions & 1 deletion
This file was deleted.

labs/oop/1.in

Lines changed: 0 additions & 1 deletion
This file was deleted.

labs/oop/2.ans

Lines changed: 0 additions & 1 deletion
This file was deleted.

labs/oop/2.in

Lines changed: 0 additions & 1 deletion
This file was deleted.

labs/oop/README.md

Lines changed: 52 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,44 @@ Possible Points: 100
44

55
Write a Python program to solve the Kattis problem - Bijele - [https://open.kattis.com/problems/bijele](https://open.kattis.com/problems/bijele) . Read the problem statement carefully to design a correct solution using OOP and unittest.
66

7+
## Install Kattis-cli
8+
9+
- if you've installed kattis-cli before, update it to the latest version
10+
11+
```bash
12+
$ pip install -U kattis-cli
13+
$ python -m pip install -U kattis-cli
14+
```
15+
16+
- if you've not installed kattis-cli before, install it
17+
18+
```bash
19+
$ pip install kattis-cli
20+
$ python -m pip install kattis-cli
21+
```
22+
23+
## Setup Kattis-cli
24+
25+
- setup kattis-cli by providing logging in to Kattis using your Kattis username and password
26+
27+
```bash
28+
kattis setup
29+
```
30+
731
## Lab Instructions
832

9-
1. Open your CS0Lab-... repo in VS Code
10-
2. Create lab folder **oop** inside your CS0Lab-... repository
11-
3. Inside the lab folder, create two files.
12-
4. Type the partial code stub provided and fix all FIXMEs. (80 points)
13-
5. Follow best programming practices by using proper white spaces, comments, etc.
33+
- Open your CS0Lab-... repo in VS Code
34+
- Create lab folder **oop** inside your CS0Lab-... repository
35+
- Inside the lab folder, download the problem metadata and sample files for the problem **bijele** using Kattis-clis
1436

15-
```note
16-
IMPORTANT: Never ask the user telling what data to enter for Kattis problems. Kattis knows what to enter.
17-
Directly read the input. Print only the answer as displayed in the sample output.
18-
Print as asked: nothing less; nothing more!
19-
Kattis is a computer program that provides specific input and expects exact output – to a space to give the correct verdict.
37+
```bash
38+
kattis get bijele
2039
```
2140

22-
6. Run unit test using pytest and create screenshot when all the test cases pass. Install pytest if required. Pick one of the following ways to run pytest.
41+
- Inside **bijele** folder, type the partial code stub provided and fix all FIXMEs. (80 points)
42+
- Follow best programming practices by using proper white spaces, comments, etc.
43+
`
44+
- Run unit test using pytest and create screenshot when all the test cases pass. Install pytest if required. Pick one of the following ways to run pytest.
2345

2446
```bash
2547
$ pytest --version
@@ -28,10 +50,25 @@ Kattis is a computer program that provides specific input and expects exact outp
2850
$ python -m pytest .
2951
```
3052

31-
7. Test the whole program manually. While testing, provide input using the same format as described in the Input section and shown in input samples.
32-
8. Upload only the solution script to Kattis. You can test your solution as many times as you wish. Kattis uses its own hidden test cases to test your program against. However, your goal is to get the accepted verdict in the first try.
33-
9. Create screenshots showing your local testing and the kattis final Accept verdict and save them to the lab folder. (10 points)
34-
10. Update your README file (10 points) as shown here: [https://github.com/rambasnet/csci000-astudent](https://github.com/rambasnet/csci000-astudent)
53+
54+
- Test the whole program using Katts-cli. (10 points)
55+
56+
```bash
57+
$ cd bijele
58+
$ kattis test
59+
```
60+
61+
- Create the screenshot of the correct local test result. (10 points)
62+
- Submit the solution to Kattis using Kattis-cli. (10 points)
63+
64+
```bash
65+
$ cd bijele
66+
$ kattis submit
67+
```
68+
69+
- Create screenshot of the kattis final Accepted verdict and save it to the lab folder. (10 points)
70+
71+
- Update your README file (10 points) as shown here: [https://github.com/rambasnet/csci000-astudent](https://github.com/rambasnet/csci000-astudent)
3572

3673
## Submission
3774

labs/oop/bijele.py renamed to labs/oop/bijele/bijele.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
5. print the difference as shown in the sample output
1212
"""
1313

14-
from chess import Chess
14+
from labs.oop.bijele.chess import Chess
1515

1616

1717
def main() -> None:
File renamed without changes.

labs/oop/test_chess.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Module to test the Chess class.
33
"""
44

5-
from chess import Chess
5+
from labs.oop.bijele.chess import Chess
66

77

88
def test__init__() -> None:

0 commit comments

Comments
 (0)