Python Program To Convert Given Integer To Roman Numerals | Programs

preview_player
Показать описание
In this Python programming video tutorial we will learn to write a program to convert given integer to roman numerals in detail.

In roman numerals numbers are represented using letters of alphabet.

In the program I did a mistake in symbol list.
C = 100 not D

#PythonPrograms #RomanNumerals

For more free tutorials on computer programming
Рекомендации по теме
Комментарии
Автор

Mam you did one big mistake in program🙆🏼‍♂️
100=C but you kept D
90= XC but you kept XD

nandalala
Автор

your teaching is good mam but i have easy soluton
def convertRoman(a):
ROMANS = (('V', 5000),
('MV', 4000),
('M', 1000),
('CM', 900),
('D', 500),
('CD', 400),
('C', 100),
('XC', 90),
('L', 50),
('XL', 40),
('X', 10),
('IX', 9),
('V', 5),
('IV', 4),
('I', 1))

res=""
for roman, value in ROMANS:
while a>=value:
res=res+roman
a=a-value
return res

a=int(input('enter a digit to convert it into roman :'))
print(convertRoman(a))


thank you

vinod
Автор

Amulya - you should open a link to support you. Whoever can/wants to donate and likes your content might donate/support you. You are doing a amazing job as a teacher. Thank you very much.

greeshmashetty
Автор

this vid got passed along my entire computer science class - thank you its a really good tutorial

acemerriott
Автор

what makes your tutorials more awesome is that you indirectly teach us algorithm in addition with progrmming
Thank you mam

mohamedcherni
Автор

A girl commented on one of your video to make this You accepted the challenge and made the program.... So awesome!

mfkngod
Автор

Instead of 2 lists can't we go for dictionary for storing those values??

jammulavarun
Автор

Don't know why u got less thumbs up while u r the only one who define things with the whole working scenarios.
U r not good but great tutor👍

high-fliers
Автор

Great tutorial. Well explained everything that happening in the function.

bencielcabutin
Автор

One day I also want to be a coding pro like you mam, you are my inspiration.

bibekanandasahoo
Автор

extremally love this one tutorial! thank you

Brianvanvlymen
Автор

Mam your presentation is very nice I have one doubt why D in roman list is repeated twice

murtykunapuli
Автор

100k soon!! any suprises for the fans and subscribers?! jus kiddin just keep uploading videos !!

pythonenthusiast
Автор

This python programming is very intersting I tried at house it is working thanks

balakrishnavaidyanathan
Автор

i try this code but why my output was <function div at 0xblablabla>
how to solve this?

keitayongz
Автор

Also please disable the yellow highlighting the text in your future videos. Very disturbing when we want to study something.

greeshmashetty
Автор

Write a python program to display each word of a string and print its length.
Mam can u please give me the answer

godx
Автор

error :return outside function .can u explain mam.

HanishreddySudhini
Автор

Do you know any program for converting roman number to integer

balakrishnavaidyanathan
Автор

if I want to convert larger number than 3999 what i can to do?
for exampel tile pleas help me i cant program it.

amirhosseinzadeh