






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...
In C++, Write a program that reads in a length in meters and will output the equivalent length in feet and inches. Express feet as an integer and inches to the nearest 1/100 of an inch. You must write and use a function that uses the following function prototype to perform the calculation: void MtoFtIn(double meters, int& feet, double& inches); The function should not input any data or print any results, it only does the calculation. Include a loop that...
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...
Write the code in python programming Language String Statistics: Write a program that reads a string from the user and displays the following information about the string: (a) the length of the string, (b) a histogram detailing the number of occurrences of each vowel in the string (details provided below), (c) the number of times the first character of the string occurs throughout the entire string, (d) the number of times the last character of the string occurs throughout the...
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...
Lab: User login system (python) Create a user login system. Your code should do the following: 1.Load your user database from “UD.txt” (USE THE EXACT FILE NAME, file is given in the folder) 2.Display “Login or create a new user? Select L to login, select C to create new user.” 3. If wrong selection is entered, take the user back to step 2. 4. If the user entered “L”, display “Please enter your user name and hit enter” 5. Check...