COMP9021 Principles of Programming- Assignment Problem

Assignment Help Programming Languages
Reference no: EM132390213

COMP9021 Principles of Programming

Assignment

Aim. The purpose of the assignment is to:

• develop your problem solving skills;

• design and implement the solution to a program in the form of a medium sized Python program;

• practice the use of arithmetic computations, tests, repetitions, lists, and strings.

Assessment Description

You will design and implement a program that prompts the user for an input with How can I help you? .

User input should be one of three possible kinds:

• Please convert ***

• Please convert *** using ***

• Please convert *** minimally

If user input is not of this form, with any occurrence of *** an arbitrary nonempty sequence of nonspace symbols, then the program should print out

I don't get what you want, sorry mate!

and stop.

2.1. First kind of input. In case the user inputs Please convert ***, then *** should be either a strictly positive integer (whose representation should not start with 0) that can be converted to a Roman number (hence be at most equal to 3999), or a valid Roman number; otherwise, the program should print out Hey, ask me something that's not impossible to do!

and stop.

If the input is as expected, then the program should perform the conversion, from Arabic to Roman or from Roman to Arabic, and print out the result in the form
Sure! It is ***

2.2. Second kind of input. In case the user inputs Please convert *** using ***, then the first *** should be a strictly positive integer (whose representation should not start with 0) or a sequence of (lowercase or uppercase) letters and the second *** should be a sequence of distinct (lowercase or uppercase) letters.
Moreover,

• the second *** is intended to represent a sequence of so-called generalised Roman symbols, the classical Roman symbols corresponding to the sequence MDCLXVI, whose rightmost element is meant to represent

1, the second rightmost element, 5, the third rightmost element, 10, etc.;

• if it is not an integer, the first *** is intended to represent a so-called generalised Roman number, that is, a sequence of generalised Roman symbols that can be decoded using the provided sequence of generalised Roman symbols similarly to the way Roman numbers are represented.

If that is not the case, of if it is not possible to convert the first *** from Arabic to generalised Roman or from generalised Roman to Arabic, then the program should print out

Hey, ask me something that's not impossible to do!

and stop. If the input is as expected and the conversion can be performed, then the program should indeed perform the conversion, from Arabic to generalised Roman or from generalised Roman to Arabic, and print out the result in the form

Sure! It is ***

2.3. Third kind of input. In case the user inputs Please convert *** minimally, then *** should be a sequence of (lowercase or uppercase) letters. The program will try and view *** as a generalised Roman number with respect to some sequence of generalised Roman symbols. If that is not possible, then the program should print out

Hey, ask me something that's not impossible to do!

and stop. Otherwise, the program should find the smallest integer that could be converted from ***, viewed as some generalised Roman number, to Arabic, and output a message of the form

Sure! It is *** using ***

2.4. Sample outputs. Here are a few tests together with the expected outputs. The outputs of your program should be exactly as shown.

$ python3 roman_arabic.py

How can I help you? Please do my assignment...

I don't get what you want, sorry mate!

$ python3 roman_arabic.py

How can I help you? please convert 35

I don't get what you want, sorry mate!

$ python3 roman_arabic.py

How can I help you? Please convert 035

Hey, ask me something that's not impossible to do!

Reference no: EM132390213

Questions Cloud

FINC6010 Derivative Securities- Assignment Problem : FINC6010 Derivative Securities Assignment Help and Solutions, University of Sydney Australia-How to use VIX futures or VIX options to bet against VIX index?
Prepare a health advocacy strategy plan : Australian Catholic University-How the problem was represented, and the goal of the intervention. The level of grassroots community mobilisation.
What is statistical quality control : What is statistical quality control? Explain the importance of statistical quality control for the manufacturing sector
Write a paper on the progressive movement and transformation : Write a 2-4 page paper on The rise of the progressive movement around the turn of the Twentieth Century (1880's-1910's) shaped the politics culture. and economy
COMP9021 Principles of Programming- Assignment Problem : COMP9021 Principles of Programming University of New South Wales, Australia-Design and implement the solution to a program in the form of a medium sized.
GRAD 695 Research Methodology and Writing Assignment : GRAD 695 Research Methodology and Writing Assignment - Literature review, Homework Help, Harrisburg University of Science and Technology, Pennsylvania, USA
Write a claim refusal letter : Write a claim refusal letter. You are the manager of a technology store. A customer purchased a laptop eleven months ago
COMP 1701 Human Resource Information System Assignment : COMP 1701 Human Resource Information System Assignment Help and Solution, Level: 6, Middle East College, Oman - Manage components related to HRMS
CUC107 - Cultural Intelligence and Capability Assignment : CUC107 Cultural Intelligence and Capability Assignment, Applying Cultural Capabilities Report, Assessment Help and Solution, Charles Darwin University Australia

Reviews

Write a Review

Programming Languages Questions & Answers

  Write perl code to process and analyze the sequence data

Programming for Science Informatics - Write Perl code to process and analyze the sequence data file - Write all translated amino acid sequence

  Write down the application which makes a quiz

Write down the application which makes a quiz which comprises at least three questions about hobby, music, or any other personal interest.

  Program for class quiz to implement measurable interface

State a class Quiz to implement Measurable interface. A quiz has a score and a letter grade (such as B+).

  Assignment - file access and flowcharts

Assignment - File Access and Flowcharts, The Output symbol is used to output data to a text file. When an Output symbol is reached during Raptor program execution, the system determines whether or not output has been redirected

  How to produce javascript code

Using the prompt and alert functions, invite the user to input 5 marks (integers) in the range 0-100.

  Write a method occuson that checks the appointment

Implement a superclass Appointment and subclasses Onrtime, Daily and Monthly. An appointment has a description ( for example " See the dentist") and a date. Write a method occusOn(int year,int month, int day) that checks whether the appointment oc..

  Arithmetic and application of summaries

Write some R code that carries out computation, but do it with a single R expression that contains no commas (,) and no braces ({}).

  Write a program that generates all the factors of a number

Write a program that generates all the factors of a number entered by the user. For instance, the number 12 has the factors 2 * 2 * 3.

  Create a class to describe the product

create a class to describe the product that is being ordered. You will then modify your code to create an instance of this class and utilize it in the ordering process.

  Draw the block diagram of the loop and calculate the offset

Sketch the root locus diagram for the reactor composition control loop of Problem. you are asked to model three mixing tanks in series.

  Develop a company logo application

Copying the template to your working directory. Copy the directory C: Exampl esTutori al 26Exerci sesCompanyLogo to your C: Si mpl yVB2008 directory.

  Print how many cars are on the file

print how many cars are on the file (you need to count the link list nodes ) and print every thing about all cares that have been manufactured on 2012 on the a new file called 2012 cares

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd