# -*- coding: utf-8 -*-
"""
Created on Sun Sep 1 22:31:51 2019
@author: Ashwini
"""
## part 1
area=250
h=50
poro = 0.33
swi = 0.25
b_oi = 1.1
stoiip = (7758*area*h*poro*(1-swi))/b_oi
print("STOIIP = " + str(stoiip))
## part 2
bv_acraft = area*h
print("BV - acre-feet = " + str(bv_acraft))
## part 3
bv_rb = bv_acraft *7758
print("BV in barrels = " + str(bv_rb))
## part 4
#since poro is the ratio of pore volume to bulk volume
v_p_acraft = bv_acraft*poro
v_p_rb = bv_rb * poro
print("Pore vol.-acre-feet = " +str(v_p_acraft)+";Pore vol.-barrels
="+str(v_p_rb))
##part 5
#hcpv = 7758*A*h*poro*(1-swi)
# since v_p_rb is already a product of 7758*A*h*poro
hcpv = v_p_rb*(1-swi)
print("HCPV = " +str(hcpv))
#part6
#one line python code to assign values
poro_B , poro_C = 0.25 , 0.35
stoiip_B = (7758*area*h*poro_B*(1-swi))/b_oi
stoiip_C = (7758*area*h*poro_C*(1-swi))/b_oi
#3mean to 3 reservoirs stoiip
mean_stoiip = (stoiip + stoiip_B + stoiip_C)/3.0
##using freater than operator
print(stoiip_B>stoiip_C)
## adding 10% of stoiip_B to its value using += operator
stoiip_B +=0.1*stoiip_B
##fast python code to update stoiip_c to 90% of its value
stoiip_C = 0.9*stoiip_C
Volumetric Reserves Estimation The Stock-tank Oil Initially in Place (STOTIP) is the amount of oil that...
Deletion of List Elements The del statement removes an element or slice from a list by position. The list method list.remove(item) removes an element from a list by it value (deletes the first occurance of item) For example: a = ['one', 'two', 'three'] del a[1] for s in a: print(s) b = ['a', 'b', 'c', 'd', 'e', 'f', 'a', 'b'] del b[1:5] print(b) b.remove('a') print(b) # Output: ''' one three ['a', 'f', 'a', 'b'] ['f', 'a', 'b'] ''' Your textbook...
1.Given an int variable n that has been initialized to a positive value and, in addition, int variables k and total that have already been declared, use a for loop to compute the sum of the cubes of the first n whole numbers, and store this value in total. Thus if n equals 4, your code should put 1*1*1 + 2*2*2 + 3*3*3 + 4*4*4 into total. Use no variables other than n, k, and total.(c++) 2.Given an int variable...
Design and implement a C++ class called Date that has the following private member variables month (int) day (nt) . year (int Add the following public member functions to the class. Default Constructor with all default parameters: The constructors should use the values of the month, day, and year arguments passed by the client program to set the month, day, and year member variables. The constructor should check if the values of the parameters are valid (that is day is...
IN JAVA PLEASE HELP!
ALSO PLEASE ADD COMMENTS
Summary Build two classes (Fraction and Fraction Counter) and a Driver for use in counting the number of unique fractions read from a text file. We'll use the ArrayList class to store our list of unique Fraction Counters. Rather than designing a monolithic chunk of code in main like we did in the previous homework, we'll practice distributing our code into containers (called classes) that you will design specifically to tackle this...
Exercise 6: Program exercise for 2D List Write a complete Python program including minimal comments (file name, your name, and problem description) that solves the following problem with the main function: Problem Specification: The following code reads values from the file object infile and stores them in the 2d list table2: (It assumes that each line contains values of elements in each row and the values are whitespace separated.) table2 = [] for line in infile: row=line.split() intRow = []...
Lab 1: InheritanceTest Write a program called InheritanceTest1.java to support an inheritance hierarchy for class Point–Square–Cube. Use Point as the superclass of the hierarchy. Specify the instance variables and methods for each class. The private data of Point should be the x-y coordinates, the private data of Square should be the sideLength, and the private data of Cube should be depth. Provide applicable accessor methods, mutator methods, toString() methods, area() method, and volume() method to all classes. Write a program...
Task #1 Creating a New Class1. In a new file, create a class definition called Television.2. Put a program header (comments/documentation) at the top of the file// The purpose of this class is to model a television// Your name and today's date3. Declare the 2 constant fields listed in the UML diagram.4. Declare the 3 remaining fields listed in the UML diagram.5. Write a comment for each field indicating what it represents.6. Save this file as Television.java.7. Compile and debug....
package _solution;
/**
This program demonstrates how numeric types and operators behave in Java
Do Task #1 before adding Task#2 where indicated.
*/
public class NumericTypesOriginal {
public static void main (String [] args) {
//TASK #2 Create a Scanner object here
//identifier declarations
final int NUMBER = 2 ; // number of scores
int score1 = 100; // first test score
int score2 = 95; // second test score
final int BOILING_IN_F = 212; // boiling temperature
double fToC;...
I need one file please (C++)(Stock Market) Write a program to help a local stock trading company automate its systems. The company invests only in the stock market. At the end of each trading day, the company would like to generate and post the listing of its stocks so that investors can see how their holdings performed that day. We assume that the company invests in, say, 10 different stocks. The desired output is to produce two listings, one sorted...