---
type: "Source File"
title: "\"\"\"Add screwed scores to existing countries.\"\"\""
description: "\"\"\"Add screwed scores to existing countries.\"\"\" import sqlite3 import os DB_PATH = os.path.join(os.path.dirname(__file__), 'copecheck_countries.db') SCREWED_SCORES = { 'United States': 70, 'United Kingdom': 78."
resource: "https://countries.copecheck.com"
tags: ["copecheck", "countries", "source-file", "py"]
timestamp: "2026-04-27T09:55:53Z"
site: "countries"
source_path: "copecheck-countries/add_screwed_scores.py"
---

# """Add screwed scores to existing countries."""

Source path: `copecheck-countries/add_screwed_scores.py`  
Index snapshot generated: `2026-11-24T13:27:52Z`  
File modified: `2026-04-27T09:55:53Z`

```py
"""Add screwed scores to existing countries."""
import sqlite3
import os

DB_PATH = os.path.join(os.path.dirname(__file__), 'copecheck_countries.db')

SCREWED_SCORES = {
    'United States': 70,
    'United Kingdom': 78,
    'China': 58,
    'Germany': 62,
    'Japan': 65,
    'India': 85,
    'France': 64,
    'Canada': 68,
    'Australia': 66,
    'South Korea': 60,
    'Sweden': 55,
    'Singapore': 52,
    'United Arab Emirates': 58,
    'Brazil': 50,
    'Nigeria': 42,
    'Indonesia': 48,
    'Italy': 67,
    'Spain': 63,
    'Netherlands': 60,
    'Switzerland': 55,
}

conn = sqlite3.connect(DB_PATH)

# Add column if missing
try:
    conn.execute("ALTER TABLE countries ADD COLUMN screwed_score REAL")
    print("Added screwed_score column")
except sqlite3.OperationalError:
    print("screwed_score column already exists")

# Add submitted_by column if missing
try:
    conn.execute("ALTER TABLE countries ADD COLUMN submitted_by TEXT DEFAULT 'system'")
    print("Added submitted_by column")
except sqlite3.OperationalError:
    print("submitted_by column already exists")

# Update scores
for name, score in SCREWED_SCORES.items():
    cur = conn.execute("UPDATE countries SET screwed_score = ? WHERE name = ?", (score, name))
    if cur.rowcount:
        print(f"  {name}: screwed_score = {score}")
    else:
        print(f"  {name}: NOT FOUND in database")

conn.commit()
conn.close()
print("Done!")
```
