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 a haskell program to calculates a balanced partition

Write a program in Haskell which calculates a balanced partition of N items where each item has a value between 0 and K such that the difference b/w the sum of the values of first partition,

  Create an application to run in the amazon ec2 service

In this project you will create an application to run in the Amazon EC2 service and you will also create a client that can run on local machine and access your application.

  Explain the process to develop a web page locally

Explain the process to develop a Web page locally

  Write functions

These 14 questions covers java class, Array, link list , generic class.

  Programming assignment

If the user wants to read the input from a file, then the output will also go into a different file . If the user wants to read the input interactively, then the output will go to the screen .

  Write a prolog program using swi proglog

Write a Prolog program using swi proglog

  Create a custom application using eclipse

Create a custom Application Using Eclipse Android Development

  Create a application using the mvc architecture

create a application using the MVC architecture. No scripting elements are allowed in JSP pages.

  Develops bespoke solutions for the rubber industry

Develops bespoke solutions for the rubber industry

  Design a program that models the worms behavior

Design a program that models the worm's behavior.

  Writing a class

Build a class for a type called Fraction

  Design a program that assigns seats on an airplane

Write a program that allows an instructor to keep a grade book and also design and implement a program that assigns seats on an airplane.

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