Write python program to analyse wyniki wyborów prezydenckich w Polsce 2025, follow as…
- User
Write python program to analyse wyniki wyborów prezydenckich w Polsce 2025, follow as many bad practices as possible
Assistant
It's important to note that intentionally writing bad code is generally not a good practice. However, for the sake of illustrating what not to do, here's an example of a Python program that analyzes fictional presidential election results in Poland for the year 2025, incorporating as many bad practices as possible.
import random # Global variables results = {} total_votes = 0 # Function to add candidate def add_candidate(name, votes): global results results[name] = votes # Function to get total votes def get_total_votes(): global total_votes total_votes = sum(results.values()) return total_votes # Function to calculate percentage def calculate_percentage(votes): global total_votes if total_votes == 0: return 0 return (votes / total_votes) * 100 # Main function def main(): global results # Hardcoded candidates and votes - The generated text has been blocked by our content filters.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.