Alice Community Question on Roman Numerals

 Question on Roman Numerals
 TheDarkWolf Junior Member     Status: Offline Posts: 3 Join Date: Mar 2012 Location: Fargo, ND Question on Roman Numerals - 03-09-2012, 04:48 AM I am doing a project which entitles my character to say a number as a roman numeral. Can someone explain to me on how i can accomplish this?
 TheDarkWolf Junior Member     Status: Offline Posts: 3 Join Date: Mar 2012 Location: Fargo, ND 03-09-2012, 04:49 AM And by meaning not the say command but how can i get my character to say a number as a roman numeral
 sfunk Senior Member     Status: Offline Posts: 1,112 Join Date: Mar 2011 Location: I don't know 03-09-2012, 09:18 AM so i'm guessing you mean as example have 1=I 2=II and so forth? if so, you need to explain more on how you need to accomplish this goal, such as, are we having a user input a value which then converts it to a Roman numeral? or are we just using pre-determined numbers? if you are using pre-determined numbers, that would be easy, just have an object say 1=I,2=II etc. However, I'm assuming you want user input, this is kinda tricky as in you would have to figure out a limit of value you want the user to be able to enter, The reason I say this is because the only method I can think of to do this is using If/else statements. so to say if x==y then object blah blah blah else do nothing Which this is saying if x (your variable) is equaled to value(normally user input) then the alice world will do whatever action you tell it to do. you would just have to make a bunch of these and then have the user put their input, then have the world check their input with your statements, and have whatever action it is told to do be bone. If you are stuck on a project, check out the tutorials I made here at this link: http://alice.org/community/showthread.php?p=36778#post36778 There are lots of tutorials on it so far, including some youtube videos, check it out Or.. Go to my youtube channel to check out my alice 2.2 tutorials I have there.. http://www.youtube.com/user/sfunk1992?feature=mhsn
 zilants Junior Member   Status: Offline Posts: 1 Join Date: Mar 2012 Location: salty seas 03-29-2012, 05:04 PM How would i say make a program that asks me for a number input and i type in say a digit 1-5 and a object tells me it back in roman numerals? ex 1=i 2=ii etc
SnowWolf
Junior Member

Status: Offline
Posts: 2
Join Date: Feb 2014
Location: Maryland
02-18-2014, 03:29 PM

Quote:
 Originally Posted by sfunk so i'm guessing you mean as example have 1=I 2=II and so forth? if so, you need to explain more on how you need to accomplish this goal, such as, are we having a user input a value which then converts it to a Roman numeral? or are we just using pre-determined numbers? if you are using pre-determined numbers, that would be easy, just have an object say 1=I,2=II etc. However, I'm assuming you want user input, this is kinda tricky as in you would have to figure out a limit of value you want the user to be able to enter, The reason I say this is because the only method I can think of to do this is using If/else statements. so to say if x==y then object blah blah blah else do nothing Which this is saying if x (your variable) is equaled to value(normally user input) then the alice world will do whatever action you tell it to do. you would just have to make a bunch of these and then have the user put their input, then have the world check their input with your statements, and have whatever action it is told to do be bone.

I'm actually having the same issue as this poster and thought maybe I could get a bit of direction. This is the actual text of the tutorial from the Alice book.

"Create an interactive world that asks the user to enter a number that is at least 1 but not greater that 10. A character of your choice should translate the number to Roman numerals, and say the roman numerals in a speech bubble. If the user enters a number outside the range of 1 through 10, the character should say that is an invalid number was entered."

The first and third part I can do fine. I declare the variable, then set the variable to "ask the user for a number", I create an if/else statement to compare the variable to a number less than or equal to 10, and then I add what would be said if the number falls inside or outside of the range. My issue is I have no clue on when a user inputs say a 5 to get it to appear as the roman numeral V when the text bubble pops up. Sorry to bump an older topic but I thought it would make more sense than creating a new one.

 Done
 MrMoke Senior Member     Status: Offline Posts: 501 Join Date: Sep 2007 Location: Austin, Texas Done - 02-18-2014, 04:16 PM Are you by any chance studying how arrays work? sounds like a perfect opportunity to use one, and makes for a really short program once you get it set up.
SnowWolf
Junior Member

Status: Offline
Posts: 2
Join Date: Feb 2014
Location: Maryland
02-18-2014, 04:48 PM

Quote:
 Originally Posted by MrMoke Are you by any chance studying how arrays work? sounds like a perfect opportunity to use one, and makes for a really short program once you get it set up.
We aren't even close to that, we are on if/else statements currently.

 More Cumbersome, bit Simple
 MrMoke Senior Member     Status: Offline Posts: 501 Join Date: Sep 2007 Location: Austin, Texas More Cumbersome, bit Simple - 02-18-2014, 07:12 PM If answer < 1 OR answer > 10 The character says "Duh". If the answer == 1 The character says "I". Etc., etc., etc. Last edited by MrMoke; 02-19-2014 at 08:55 AM.
 empowermenttech Junior Member   Status: Offline Posts: 2 Join Date: Jan 2014 Location: lucknow 02-28-2014, 05:17 AM Nice question and very good answers. I got also my answer. Thanks
 Ok
 MrMoke Senior Member     Status: Offline Posts: 501 Join Date: Sep 2007 Location: Austin, Texas Ok - 03-04-2014, 10:57 AM That's good.

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is Off Forum Rules
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home Announcements     Community News and Announcements Alice 3     How Do I?     Works In Progress     Share Your World     Share Custom Classes     Bugs and Trouble Shooting     Suggestion Box Alice 2     How do I...?     Works-In-Progress     Share Worlds     Share Objects     Bugs and Troubleshooting     Suggestion Box Educators     Teaching with Alice     Teaching Using Alice 3     Teaching Using Alice 2     CS Principles and Alice     AP CSA and Intro to Java and Alice     Workshops     Alice Player and VR General Discussion     Questions and Comments     The Lounge