Concept explainers
Currency
Write a
1 Dollar = 98.93 Yen
1 Dollar = 0.74 Euros
Format your currency amounts in fixed-point notation, with two decimal places of precision, and be sure the decimal point is always displayed.
Want to see the full answer?
Check out a sample textbook solutionChapter 3 Solutions
Starting Out with C++ from Control Structures to Objects (9th Edition)
Additional Engineering Textbook Solutions
Electric Circuits. (11th Edition)
Java How to Program, Early Objects (11th Edition) (Deitel: How to Program)
Thinking Like an Engineer: An Active Learning Approach (4th Edition)
Modern Database Management
Degarmo's Materials And Processes In Manufacturing
Java: An Introduction to Problem Solving and Programming (8th Edition)
- # given a radius, find the area of a circle # use value of pi as 3.1415 def get_area_circle(r): """ what it takes radius of a circle (any positive real number) what it does: computes the area of a circle given a radius, find the area of a circle area = pi*r2 (pi times r squared) what it returns area of a circle. Any positive real number (float) """ # your code goes in herearrow_forwardInput a value for the variable y so that the variable x becomes 4 after the code executes. favorite_numbers = y favorite_numbers.remove(-1) x = len(favorite_numbers)arrow_forwarduppose you have a certain amount of money in a savings account that earns compoundmonthly interest, and you want to calculate the amount that you will have after a specificnumber of months. The formula, which is known as the future value formula, is:F=P×(1+i)tThe terms in the formula are as follows:o F is the future value of the account after the specified time period.o P is the present value of the account.o i is the monthly interest rate.o t is the number of months.Write a program that prompts the user to enter the account’s present value, monthlyinterest rate, and the number of months that the money will be left in the account. Theprogram should pass these values to a function named futureValue that returns thefuture value of the account, after the specified number of months. The program shoulddisplay the account’s future value. i attached the screenshot of the output so the output should look like that. the coding should be in c++arrow_forward
- C++ languagearrow_forward*The following needs to be in python For this application, you will need to create a Python application that reads the sales for 12 months from a file and calculates the total yearly sales as well as the average monthly sales. In addition, this program should let the user edit the sales for any month. Jan 14317 Feb 3903 Mar 1073 Apr 3463 May 2429 Jun 4324 Jul 9762 Aug 15578 Sep 2437 Oct 6735 Nov 88 Dec 2497 Step 1 Define a display_title() function and have it use the print() to show the text: [FirstName] [LastName]'s Monthly Sales Replace the placeholders with your own first and last name add a space using the print() Define a display_menu() function and have it Use the print() function several times to show the following text with a space after: COMMAND MENUmonthly - View monthly salesyearly - View yearly summaryedit - Edit sales for a monthexit - Exit program Step 2 Define a main() function Call the display_title() function and the…arrow_forwardpython The intent of this program is to manage a set of contacts. Each contact will have data associated with it: Id – number/integer First Name – string Last Name – string Age – number/integer Phone Number – string Email – string Anything else you’d like to add to make yours unique (can result in extra credit) Gender – character or string (m/f/o) Twitter ID, Facebook Id, etc You must allow the customer to do the following actions on the contact list: List all contacts Add contact Delete contact Edit contact Exit program You should leverage a database (PostgreSQL) to save everything to the DB and read from it. You should use classes for this assignment. This means you should have two classes: Contact – all the attributes/properties described above with appropriate constructor. Methods: Add (constructor - __init__(p_id, p_fname, p_lname, p_age, p_phone, p_email, p_gender) Edit Contact List (contact_list) – built on Python list (or creating one within the constructor), you…arrow_forward
- 99 question Reza Enterprises sells tickets for buses, tours, and other travel services. Because Reza frequently mistypes long ticket numbers, Reza Enterprises has asked his students to write an application that shows if a ticket is invalid. Your application/program tells the ticket agent to enter a six-digit ticket number. Ticket numbers are designed so that if you lose the last digit of the number, then divide by 7, the remainder of the division is exactly the same to the last dropped digit. This process is shown below: Step 1: Enter the ticket number; for example 123454 Step 2: Remove the last digit, leaving 12345 Step 3: Determine the remainder when the ticket number from step 2 is divided by 7. In this case, 12345 divided by 7 leaves a remainder of 4. Step 4: Display a message to the ticket agent indicating whether the ticket number is valid or not. If the ticket number is valid, save the number to a .txt file called “tickets.txt” and.arrow_forwardWrite an application that displays the factorial for every integer value from 1 to 10. A factorial of a number is the product of that number multiplied by each positive -integer lower than it. For example, 4 factorial is 4 * 3 * 2 * 1, or 24. Save the file as Factorials.cpp.arrow_forwardCompute the income tax due on taxable income entered by the user, given the data as shown in the following table. Be sure to include error checking to make sure the user does not enter a negative number. Assume all entries are integer values. Taxable Income Tax Due From To $0 $49,999 $0 + 5% of amount over $0 $50,000 $99,999 $2,500 +7% of amount over $50,000 $100,000 $6,000 + 9% of amount over $100,000 (Provide the following: Pseudocode; Flowchart) Dago 2 of 5arrow_forward
- This standard library function returns a random floating-point number in the range of 0.0 up to 1.0 (but not including 1.0).a. randomb. randintc. random_integerd. uniformarrow_forwardC Programming Language Task: Pascal's Triangle Write a program to print Pascal's triangle. In Pascal's triangle Each number is the sum of the two numbers above it. You may assume the maximum height for this task is 20. Print each character with 5 spaces of padding. e.g.printf("%5d", variable) 1 1 1 1 2 1 133 1 1 4 6 4 1 1 5 10 10 5 1 1 6 15 20 15 6 1arrow_forwardY = Math.sqrt(4) * Math.abs(4)The value of Y is ______ a. 8 b. -16 c. 16 d. -8arrow_forward
- EBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENTEBK JAVA PROGRAMMINGComputer ScienceISBN:9781305480537Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENTC++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage Learning
- Microsoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,Programming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:CengageProgramming with Microsoft Visual Basic 2017Computer ScienceISBN:9781337102124Author:Diane ZakPublisher:Cengage Learning