Question

You have been hired by NY state lottery administrator to write a program to develop a...

You have been hired by NY state lottery administrator to write a program to develop a Combinations and Permutations Calculator. Refer to this link to check if your calculations are correct: https://www.mathsisfun.com/combinatorics/combinations-permutations-calculator.htmlYour program should ask user the following four questions:a.How many different numbers are possible?i.e. nb.How many numbers are used?i.e. rc.Is the order of the numbers important?d.Can you repeat a number?

If the Order of the numbers is important and numbers can be repeated, use this formula: n^r

If the Order of the numbers is important and numbers can not be repeated, use this formula n!/(n-r)!.

If the order of the numbers is not important and numbers can be repeated use this formula (r+n-1)!/r!(n-1)!.

If the order of the numbers is not important and numbers can not be repeated  use this formula n!/r!(n-r)!.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

The code is being provided in python

Add a comment
Know the answer?
Add Answer to:
You have been hired by NY state lottery administrator to write a program to develop a...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • use python IDEL Question 17 5 pts Problem 5 Write a program. You have been hired...

    use python IDEL Question 17 5 pts Problem 5 Write a program. You have been hired as a programmer and a Unix administrator asked you to check these three lists of users to find who had logged into all Unix servers and who had logged only into the main Unix server. Here are the lists: Main Unix Server: Server II: Server III: alex maya akhmed linda mila kyrill kyrill andrew linda akhmed rosa maya sandra linda alex You need to...

  • C programming SPTL You have been hired by a company that makes keyboards. The company is...

    C programming SPTL You have been hired by a company that makes keyboards. The company is doing a test to see which keys on the keyboard are used the most and the least. The assumption is the keys used the most will have to have better hardware and the keys used the least can have cheaper hardware. In order to be competitive in the marketplace, it is important to obtain data on the use of the keys on the keyboard...

  • use python: Write a program that reads in X whole numbers and outputs (1) the sum...

    use python: Write a program that reads in X whole numbers and outputs (1) the sum of all positive numbers, (2) the sum of all negative numbers, and (3) the sum of all positive and negative numbers. The user can enter the X numbers in any different order every time, and can repeat the program if desired. Sample Run How many numbers would you like to enter? 4 Please enter number 1: 3 Please enter number 2: -4 Please enter...

  • Exercise 2 Write a program that simulates the Texas Powerball lottery. You will have to do resear...

    I HAVE A PROBLE WITH THIS JAVA PROBLEM CAN ANYONE HELP ME PLEASE. Exercise 2 Write a program that simulates the Texas Powerball lottery. You will have to do research to find out how many numbers are drawn, and what the range(s) of the numbers are. For this exercise you need to create a class called "Powerbali", which exposes a public function called play'. This function accepts several parameters , which represent the individual numbers the player wants to play....

  • You have been hired as a programmer by a major bank. Your first project is a...

    You have been hired as a programmer by a major bank. Your first project is a small banking transaction system. Each account consists of a number and a balance. The user of the program (the teller) can create a new account, as well as perform deposits, withdrawals, and balance inquiries. The application consists of the following functions:  N- New account  W- Withdrawal  D- Deposit  B- Balance  Q- Quit  X- Delete Account Use the following...

  • Write a program to compute the product of two positive integers by repeated addition. Note: You...

    Write a program to compute the product of two positive integers by repeated addition. Note: You are not allowed to use either multiplication or division operator. Understanding the Meaning of Multiplication: Multiplication of whole numbers can be thought of as repeated addition. // not allowed to use multiplication or division operator For example, suppose that a parking lot has 6 rows of parking spaces with 8 spaces in each row. How many parking spaces are in the lot? rows To...

  • You are hired by a college to write a Java program to use a so-called check...

    You are hired by a college to write a Java program to use a so-called check sum technique for catching typing errors of student ID. The college assigns a seven-digit number to each student. The seventh digit (i.e., the rightmost digit) is determined from the other digits with the use of the following formula: 7th digit = (1 *(1st digit) * 2 * (2nd digit) * ... * 6 * (6th digit)) % 10 Your program should prompt users to...

  • 1. [ball_filler.py] You have been contracted by a bowling ball manufacturer to write a program that...

    1. [ball_filler.py] You have been contracted by a bowling ball manufacturer to write a program that estimates the amount of ball "filler they will need to order for a new line of bowling balls. Each spherical bowling ball has a diameter that can vary from 8.4 to 8.6 inches. Inside that all there are two things: (1) a uniquely shaped metal object called the core that affects the spin of the ball, and (2) stuff packed around the core making...

  • 1. A State issues car license plates with three letters followed by three numbers (for example,...

    1. A State issues car license plates with three letters followed by three numbers (for example, FGH831 or BBB222). How many different license plates are possible? (Note that letters or numbers may repeat in the license plate. Hint: Use the Fundamental Counting Rule for this question.) There are five students who are interested in presenting their final project to the class, but there is only time for three presentations. The five students are Amy, Bob, Chun, Dan and Ed. 2....

  • A State issues car license plates with three letters followed by three numbers (for example, FGH831...

    A State issues car license plates with three letters followed by three numbers (for example, FGH831 or BBB222). How many different license plates are possible? (Note that letters or numbers may repeat in the license plate. Hint: Use the Fundamental Counting Rule for this question.) There are five students who are interested in presenting their final project to the class, but there is only time for three presentations. The five students are Amy, Bob, Chun, Dan and Ed. List all...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT