Skip to content
Merged
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
29 changes: 13 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,22 @@
# codex-test
This is my first manual commit in GitHub.
This is my second manual update in GitHub.
This is my third manual change in GitHub.
This is my fourth manual change in GitHub.


# codex-test

This repository contains simple **command-line To-Do List applications** written in both Python and Java.
They demonstrate how to build interactive console apps, store data locally, and perform common CRUD operations (Create, Read, Update, Delete).

---
This repository contains simple command-line applications written in Python and Java.

## Files
- **todo.py** – Python version (stores tasks in `tasks.json`)
- **Todo.java** – Java version (stores tasks in `tasks.csv`)
- **todo.py** – Python to-do list (stores tasks in `tasks.json`)
- **Todo.java** – Java to-do list (stores tasks in `tasks.csv`)
- **practice.py** – Additional practice/testing file

---
- **TemperatureConverter.java** – Java temperature conversion utility

## How to Run – Python Version
**Requirements:** Python 3.7+
**Requirements:** Python 3.7+
```bash
python3 todo.py
```

## How to Run – Temperature Converter
**Requirements:** Java 11+
```bash
javac TemperatureConverter.java
java TemperatureConverter
```
24 changes: 24 additions & 0 deletions TemperatureConverter.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,30 @@

public class TemperatureConverter {

public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
System.out.println("Temperature Converter");
System.out.print("Enter temperature value: ");
if (!scanner.hasNextDouble()) {
System.out.println("Invalid temperature.");
scanner.close();
return;
}
double value = scanner.nextDouble();
System.out.print("Convert to (C/F): ");
String unit = scanner.next().trim().toUpperCase();
if (unit.equals("C")) {
double celsius = (value - 32) * 5.0 / 9.0;
System.out.printf("%.2f F = %.2f C%n", value, celsius);
} else if (unit.equals("F")) {
double fahrenheit = value * 9.0 / 5.0 + 32;
System.out.printf("%.2f C = %.2f F%n", value, fahrenheit);
} else {
System.out.println("Unknown unit. Please use 'C' or 'F'.");
}
scanner.close();
=======

private static double cToF(double c) {
return c * 9.0 / 5.0 + 32.0;
}
Expand Down