Write the code in Python. The output should be exact the same as the given.
#we are supposed to answer 1 question at a time #please ask the remaining again print('--- Question 1: ----') print('{:<40s}{:>15s}{:>15s}'.format(' ', 'Student', 'Non-student')) print('{:<40s}{:>15s}{:>15s}'.format('Journal of Commodity Markets', '$21', '$50')) print('{:<40s}{:>15s}{:>15s}'.format('Journal of Sustainable Mining', '$22', '$60')) print('{:<40s}{:>15s}{:>15s}'.format('Journal of Asia-Pacific Biodiversity', '$27', '$75')) student = input('\nAre you a student? (Y/N): ') j1 = input('\nSubscribe to Journal of Commodity Markets? (Y/N): ') j2 = input('Subscribe to Journal of Sustainable Mining? (Y/N): ') j3 = input('Subscribe to Journal of Asia-Pacific Biodiversity? (Y/N): ') cost = 0 print('\nYour selection:') if j1 == 'Y': print(' - Journal of Commodity Markets') cost += (student == 'Y') * 21 + (student == 'N') * 50 if j2 == 'Y': print(' - Journal of Sustainable Mining') cost += (student == 'Y') * 22 + (student == 'N') * 60 if j3 == 'Y': print(' - Journal of Asia-Pacific Biodiversity') cost += (student == 'Y') * 27 + (student == 'N') * 75 if j1 == 'N' and j2 == 'N' and j3 == 'N': print(' - None') print('\nTotal cost ${:d}'.format(cost))
Write the code in Python. The output should be exact the same as the given.
Only use the code in Objectives and write the code in Python Question 1. Study the examples below carefully and write a program for journal subscription Your program should work exactly as the following examples The text in bold indicates user input. Example 1: The user is a student, and the user subscribes to 2 journals Question 1 - Journal of Commodity Markets Journal of Sustainable Mining Journal of Asia-Pacific Biodiversity Student $21 $22 $27 Non-student $50 $60 $75 Are...
Write the code in python, if you cannot answer all the question please dont anser, thanx very much. Please gimme a screen shot for code. Write clear code with comments and follow coding convention. Comments should include your name, student number and subject code on top of your code Question 1 Create a list to store all the subject codes that you are currently doing at UOW Then use for loop to display it in a table as in the...
(PYTHON) Write a program that displays the following menu:. , Write Algorithm for Code Geometry Calculator 1. Calculate the Area of a Circle 2. Calculate the Area of a Rectangle 3. Calculate the Area of a Triangle 4. Quit Enter your choice (1 - 4): If the user enters 1, the program should ask for the radius of the circle and then display its area. If the user enters 2, the program should ask for the length and width of...
I need to write a paint job estimator program in python. I have most of it down but i keep getting errors and I dont know how to fix it or what im doing worng specs: A painting company has determined that for every 350 square feet of wall space, one gallon of paint and six hours of labor are required. The company charges $62.25 per hour for labor. Write a program call paintjobestimator.py that asks the user to enter...
python Topics covered: Using variables e Arithmetic operators Printing output Manipulating string objects . Generating random numbers . Getting user input NOTE: Each of your files must include a docstring at the top of the file containing your name, username, ID number and a description of the program. When solving these questions you must only use content covered in lectures 1 to 6 Submit the files containing your exercises using the Assignment Dropbox https:/adb auckland.ac.nz/Homel QUESTION 1 (3 MARKS) A...
1. Write a program that determines the area and perimeter of a square. Your program should accept the appropriate measurement of the square as input from the user and display the result to the screen. Area of Square = L (squared) Perimeter of Square = 4 * L 2. Write a program that determines the area and circumference of a circle. Your program should accept the appropriate measurement of the circle as input from the user and display the result to...
Use Java program Material Covered : Loops & Methods Question 1: Write a program to calculate rectangle area. Some requirements: 1. User Scanner to collect user input for length & width 2. The formula is area = length * width 3. You must implement methods getLength, getWidth, getArea and displayData ▪ getLength – This method should ask the user to enter the rectangle’s length and then return that value as a double ▪ getWidth – This method should ask the...
Write a code using python that simulates a Registration of a Username and Password with the following conditions the user can set its username display "Input username" input Username display "Input Password" input Password The password must be at least 5 characters and no longer than 10 characters if the password doesn't follow this instructions Display "Can't accept this password" once the password its stored Verify that the program works by Testing it input username Input Password The user has...
Python Program For this program the user should be able to enter multiple sequences of X, Y, and Z characters. The sequences should all be the same length. This program should output the average number and median number of X, Y, and Z characters for the set of sequences. Example. Input: XYYZ XYYZ ZZZX Output: Average number of Xs: 1 Average number of Ys: 1.33 Average number of Zs: 1.66 Median number of Xs: 1 Median number of Ys: 2...
PYTHON:please display code in python Part 1: Determining the Values for a Sine Function Write a Python program that displays and describes the equation for plotting the sine function, then prompts the user for the values A, B, C and D to be used in the calculation. Your program should then compute and display the values for Amplitude, Range, Frequency, Phase and Offset. Example input/output for part 1: Part 2: Displaying a Vertical Plot Header A vertical plot of the...