Questions tagged [roman-numerals]

The Roman numeral system is an ancient way of representing numbers. The base symbols are I (1), V (5), X (10), L (50), C (100), D (500) and M (1000).

Roman numerals on Wikipedia

273 questions
-1
votes
1 answer

Index list out of range (Roman Numeral Converter)

I basically am trying out some practice questions on leetcode. I am having an issue with some indexing issues. Does anyone know why I get this response? def romanToInt(self, s: str) -> int: roman = list(s) num = 0 for i in range(len(s) …
John Chen
  • 11
  • 4
-1
votes
1 answer

I cannot get rid of "Method is undefined for type romanCalculator error along with illegal modifiers what is the issue?

Sorry if this is a simple error, I am still very new to Java and have trouble with all the rules. I am trying to create a calculator that takes in roman numerals, converts them to integers, them performs operations with them, and then converts them…
RacerX142
  • 7
  • 2
-1
votes
1 answer

C++ Unexpected Array Overflow

About 50 minutes ago I started working on a project where I convert a string with roman numerals to an integer. I am having an issue where there is an "array overflow", and I've been troubleshooting for 30 minutes, and am getting kind of frustrated…
TheBestMagician
  • 185
  • 1
  • 9
-1
votes
1 answer

Sort alphabetically and by roman numeral

I'm starting with a list of strings. Each element contains a name and a Roman numeral. I want to sort this list alphabetically by name, and then by the Roman numeral. I only managed to create a list with [name, numeral] strings, so far: names =…
-1
votes
1 answer

StringVars behave oddly

I am working on a roman numerals converter for a school project and I ran into some problems when I tried to program a simple GUI for it. It worked perfectly without the GUI but now it outputs only 0. My code is: from tkinter import * def…
-1
votes
3 answers

Can I check a String for characters other than specific ones?

I am writing a Java program that can convert an inputted Roman Numeral into a Short, and I want it to be able to recognize and ask for input again when any letter has been inputted besides a Roman Numeral (I, V, X, L, C, D, and M). Is there a…
-1
votes
2 answers

Having issues converting numbers into roman numerals

for class I have to create a code so that it could ask the user for an integer between 1-99 and be able to print that integer in roman numerals. Issue is after creating my code it would only print the numbers fully up to 39. Once it hits 40 it…
jess
  • 13
  • 1
  • 7
-1
votes
1 answer

python -Roman numeral converter "TypeError: 'int' object is not iterable"

I am still pretty new to coding and I've been trying to complete this challenge a friend set me. I have to convert a list of numbers from the user to their roman numerals. I however get a "TypeError: 'int' object is not iterable" with my second…
C. Viljoen
  • 53
  • 1
  • 2
  • 8
-1
votes
1 answer

how to find if a record has roman numerals in SQL Server?

I want to detect records from a table (SQL Server) if it has roman numerals. Table has data as follows: Column A | Column B ----------------------------- 1 | AMC I XYZAQS 2 | ABC IV 2 XYZQWS 3 | ANR XVI ANCVP 4 …
SChowdhury
  • 163
  • 1
  • 11
-1
votes
2 answers

How and why to implement the static method intValue - Roman Numeral convert

I report for you the question of my teacher: Implement the static utility method intValue and reuse the code you have in the instance method. // TODO implement this public static int intValue(String roman) { return 0; …
InExperience
  • 103
  • 1
  • 3
  • 12
-1
votes
1 answer

fix test with method equals() and override this one and hashCode()

I try to test my code but the last System.out.printl does not answer, why? @Test public void testcopy(){ RomanNumber rn1 = new RomanNumber("M"); RomanNumber rn2 = new RomanNumber("M"); RomanNumber rn1_copy = rn1; …
InExperience
  • 103
  • 1
  • 3
  • 12
-1
votes
2 answers

phpMyAdmin - mariaDB roman numerals function

can anybody help me with my sorting function - seriously I don't know how can I make it work as supposed to. :( Database is in MariaDB in Xampp. I use phpMyAdmin to execute the query. DELIMITER $$ DROP FUNCTION IF EXISTS convRomanNumeral$$ CREATE…
Thomas Kolasa
  • 104
  • 1
  • 9
-1
votes
2 answers

IndexOutOfBoundsException, no clear cause

this is probably a really simple problem, but I can't figure out where I went wrong. This is a homework problem, but I've worked through the logic, I just seem to be missing a small detail with my syntax or something, and it's causing issues. import…
ividito
  • 321
  • 3
  • 14
-1
votes
2 answers

UVa 11616 Roman Numerals Time Limit Exceeded - I am receiving Time Limit Exceeded consistently

I am working on a problem on UVa for general programming practice, as I want to get better at programming competitively. However I am having trouble with this problem - Roman Numerals. In this problem the goal is to take input which will be in the…
Noah
  • 1
  • 2
-1
votes
1 answer

Convert Roman Numeral to Integer using Javascript

I have an array that output as roman number: var details = lst_details[sltindex].split(';'); detail[9];//is roman number and I want it as an integer; The array of details[9] is a roman numeral so I want to convert it as integer number. Anyone…
user3024562
  • 27
  • 2
  • 9