Program based on series to display a juggler sequence

Assignment Help Basic Computer Science
Reference no: EM13935029

1. First letter

a. one invalid first letter

b. one valid uppercase first letter

c. one valid lowercase first letter d. one test for each case identified by one letter i. R ii. O iii. Y iv. V v. W

2. Second letter

a. one invalid second letter after B

b. one valid uppercase for the second letter after B

c. one valid lowercase for the second letter after B

d. one test for each case identified by second letter after B i. R

e. one invalid second letter after G

f. one valid uppercase for the second letter after G

g. one valid lowercase for the second letter after GWrite a program based on the above series to display a juggler sequence, given a specified integer term to start with.

  •  Tell the user what the program does before prompting for input.
  •   All user input for this program will be need to be positive, non-zero values. So you will write a user-defined function to read positive, non-zero input from the user. The userdefined function requirements are: o The prompt for user input will be stored in a string type variable and passed as an input argument to the function (examples: "Enter the first term" or "Enter terms tp display per line").
  •  The prompts can either be stored as constant strings, or may be hardcoded strings in the function calls. o The function will prompt the user for the input and then use a loop to verify that the value input is positive and non-zero. If it is not, the function will issue an error message and then re-prompt the user to enter the number again, until a positive, non-zero value is entered. o Once valid input has been entered, the value that the user entered will be returned to the main function via the return statement.
  •  Call the above user-defined function to read in the first term in the series to be used for calculating the terms in the juggler series. Pass a prompt for the first term as an input parameter, and return the validated first term value to main.
  •  After a valid first term has been entered, call the same user-defined function a second time, to read in the number of terms to calculate (i.e. how many terms in the series will be calculated). Using the same user-defined function will work, because the user input should again be positive and non-zero. Pass the prompt for the number of terms as an input parameter, and return the validated number of terms value to main.
  • After a valid number of terms has been entered, call the same user-defined function a third time, to read in a terms per line count, representing how many terms should be displayed on each line. Again, the user input should be positive and non-zero. Pass the prompt for the terms per line as an input parameter, and return the validated terms per line value to main.
  •  Loop, calculating and outputting the value of each term in the series

Reference no: EM13935029

Questions Cloud

Describe the mechanism by which it inhibits these effects : One of the simple sugars (galactose or mannose) used in this exercise should have inhibited Con A-peroxidase binding to cheek epithelial cells and the Con A-induced hemoagglutination reaction. Name this sugar and describe the mechanism by which it..
Identify the organisational structure and culture : Identify the organisational structure and culture within Mercury Print & Packaging Limited. Compare this with the structure and culture within a large organisation.
Compliance law requires proper security controls : Write a paragraph to explain what the outcome would have been of these compliances laws had been in place before Enron's problems developed. II. Provide answers to the following questions:
Understanding of the principles of procedural programming : Unit aim: To provide learners with an understanding of the principles of procedural programming and to enable them to design and implement procedural programming solutions. Unit abstract:
Program based on series to display a juggler sequence : All user input for this program will be need to be positive, non-zero values. So you will write a user-defined function to read positive, non-zero input from the user. The userdefined function requirements are: o The prompt for user input will be ..
How do microscopes help us study cells : Exposure to tobacco smoke immobilizes cilia and they eventually disappear. How might this effect explain why smokers have an increased incidence of coughing and respiratory infections?
Method & theory in the study of religion : Locate one article in the CSU Online Library that addresses the topic of sacred Buddhist texts in connection with Buddhist involvement in social and political issues. Write a review of the article that includes the following elements: Summary of A..
Why did the patient become fatigued so rapidly : From the data presented, suggested a possible site for the defect in the patient's muscles. Suggest two other substrates which might be tested to substantiate your conclusion, and the expected results with these substrates.
Analysis of the australian bureau of statistics : Analysis of the Australian Bureau of Statistics (ABS) earnings data confirms that a persistent gender wage gap exists in Australia where males receive higher wages than females undertaking equivalent work.

Reviews

Write a Review

 

Basic Computer Science Questions & Answers

  How many bits are needed for the opcode

How many bits are needed for the opcode and how many bits are left for the address part of the instruction?

  Determine the maximum number

Determine the maximum number Determine the range (maximum - minimum) Displays a histogram that shows the numbers in each five-unit range.

  Forced decryption ruled unconstitutional

Analyze the decision by the 11th U.S. Circuit of Appeals to determine whether you believe the decision rendered was correct or incorrect based on the evidence suspected by the government.

  Which property of the matrix multiplication is demonstrated

Define a matrix A = [12 16 4;23 1 21;9 10 1] and B = [2 7 14;3 11 2;-9 10 12]. Perform matrix multiplication A*B, and call this D. Find the transpose of A, and call this E. Find the transpose of B, and call this F. Find the transpose of D, and call t..

  Explain traffic control devices to alert drivers

Are all intersections located safely with respect to horizontal and vertical alignment? Where intersections happen at end of high-speed environments (e.g., at approaches to towns); are there traffic control devices to alert drivers?

  Design a payroll class

Write the appropriate accessor and mutator methods and a constructor that accepts the employee's name and ID number as arguments.

  The firstround of the des decryption

Compute the bits number 1, 16, 33, and 48 at the output of the firstround of the DES decryption, assuming that the ciphertext block iscomposed of all ones and the external key is composed of all ones

  Ospf messages and icmp messages are directly encapsulated

OSPF messages and ICMP messages are directly encapsulated in an IP data- gram. If we intercept an IP datagram, how can we tell whether the payload belongs to OSPF or ICMP?

  Analyse the case study and produce a vision document

Analyse the case study and produce a Vision document for a software system to solve the business issue identified in the case study - use case diagram capturing at least all critical and significant use cases that the system will have to support

  Deduce closed-form expression-estimates-linear regression

In weighted least-squares linear regression, we have weight ri corresponding to each data measurement. Deduce closed-form expression for estimates of w and b which minimize objective function.

  Write a java application that inputs three integers

Write a Java application that inputs three integers from the user and displays the sum, average, product, smallest and largest of the numbers.

  Identify the equivalence classes

Identify the equivalence classes

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