1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Helga [31]
3 years ago
10

Can anybody teach me how to make an app with flask and pygame together?​

Engineering
1 answer:
sweet [91]3 years ago
8 0

Answer:

no :-(

Explanation:

Are you sure these technologies fit together?

As I understand it, flask is a library to write web services using python. It will essentially serve HTML pages and perhaps REST interfaces?

Pygame is a local machine abstraction layer to graphics and other i/o. I don't think it will run in a browser.

What is your plan?

You might be interested in
Create an abstract class DiscountPolicy. It should have a single abstract method computeDiscount that will return the discount f
eimsori [14]

Answer:

Java Code was used to define classes in the abstract discount policy,The bulk discount, The buy items get one free and the combined discount

Explanation:

Solution

Code:

Main.java

public class Main {

public static void main(String[] args) {

  BulkDiscount bd=new BulkDiscount(10,5);

BuyNItemsGetOneFree bnd=new BuyNItemsGetOneFree(5);

CombinedDiscount cd=new CombinedDiscount(bd,bnd);

System.out.println("Bulk Discount :"+bd.computeDiscount(20, 20));

  System.out.println("Nth item discount :"+bnd.computeDiscount(20, 20));

 System.out.println("Combined discount :"+cd.computeDiscount(20, 20));    

  }

}

discountPolicy.java

public abstract class DiscountPolicy

{    

public abstract double computeDiscount(int count, double itemCost);

}    

BulkDiscount.java  

public class BulkDiscount extends DiscountPolicy

{    

private double percent;

private double minimum;

public BulkDiscount(int minimum, double percent)

{

this.minimum = minimum;

this.percent = percent;

}

at Override

public double computeDiscount(int count, double itemCost)

{

if (count >= minimum)

{

return (percent/100)*(count*itemCost); //discount is total price * percentage discount

}

return 0;

}

}

BuyNItemsGetOneFree.java

public class BuyNItemsGetOneFree extends DiscountPolicy

{

private int itemNumberForFree;

public BuyNItemsGetOneFree(int n)

{

  itemNumberForFree = n;

}

at Override

public double computeDiscount(int count, double itemCost)

{

if(count > itemNumberForFree)

return (count/itemNumberForFree)*itemCost;

else

  return 0;

}

}

CombinedDiscount.java

public class CombinedDiscount extends DiscountPolicy

{

private DiscountPolicy first, second;

public CombinedDiscount(DiscountPolicy firstDiscount, DiscountPolicy secondDiscount)

{

first = firstDiscount;

second = secondDiscount;

}

at Override

public double computeDiscount(int count, double itemCost)

{

double firstDiscount=first.computeDiscount(count, itemCost);

double secondDiscount=second.computeDiscount(count, itemCost);

if(firstDiscount>secondDiscount){

  return firstDiscount;

}else{

  return secondDiscount;

}

}  

}

6 0
3 years ago
A fatigue test is performed on 69 rotating specimens made of 5160H steel. The measured number of cycles to failure (L in kcycles
tensa zangetsu [6.8K]

Answer:

(a) Mean = 122.9, σ = 30.071

(b) No. of failed specimens at less than 115k cycles are 27.

(c) μ = 39.07

Explanation:

We are given:

L  60  70  80  90  100  110  120  130  140  150  160  170  180  190  200  210

f    2     1    3     5     8     12     6     10     8     5     2      3      2      1       0      1

(a) First we need to calculate the mean and standard deviation. The formula for calculating mean is:

Mean = ∑fx/∑f

And for standard deviation we have:

S.D. = √Var

Var = ∑fx²/∑f - (Mean)²

∑fx = (2*60) + (1*70) + (3*80) + (5*90) + (8*100) + (12*110) + (6*120) + (10*130) + (8*140) + (5*150) + (2*160) + (3*170) + (2*180) + (1*190) + (0*200) + (1*210)

         = 120 + 70 + 240 + 450 + 800 + 1320 + 720 + 1300 + 1120 + 750 + 320 + 510 + 360 + 190 + 0 + 210

∑fx = 8480

Mean = ∑fx/∑f

          = 8480/69

Mean = 122.9  

∑fx² = (2*60²) + (1*70²) + (3*80²) + (5*90²) + (8*100²) + (12*110²) + (6*120²) + (10*130²) + (8*140²) + (5*150²) + (2*160²) + (3*170²) + (2*180²) + (1*190²) + (0*200²) + (1*210²)

   =7200+4900+19200+40500+80000+145200+86400+169000+156800+112500+51200+86700+64800+36100+0+44100

∑fx² = 1104600

Var = ∑fx²/∑f - (Mean)²

     = 1104600/69 - (122.9)²

     = 16008.69565 - 15104.41

Var = 904.2856

S.D = √Var

σ = √904.2856

σ = 30.071

(b) Let X be the number of failed specimen.

We will use the z-score to calculate the probability. The formula for z-score is:

z = (X-μ)/σ

P(X<115) = P(z<(115-122.9)/30.071)

              = P(z<-0.26)

Using the normal distribution probability table, we can compute the value of  P(z<-0.26).

P(X<115) = 0.3974

So, no. of failed specimens at less than 115k cycles are: 0.3974*69 = 27 specimens

(c) σ = 30.071

P(x<115) = 0.99

P(z<(115-μ)/30.071) = 0.99

From the normal distribution table we find that 0.99 lies between the z values 2.52 and 2.33. Hence, we get 2.525 as the z-value at which the probability is 0.99.

z = (x-μ)/σ

2.525 = (115 - μ)/30.071

75.93 = 115 - μ

μ = 115 - 75.93

μ = 39.07

4 0
3 years ago
Which option distinguishes the members of a software deployment process team most likely involved in the following scenario?
Alchen [17]

Answer:

A local bank, with several branches in three cities, requests changes to its mortgage calculation software.

5 0
2 years ago
6.1-2. Diffusion of CO, in a Binary Gas Mixture. The gas CO2 is diffusing at stcady state through a tube 0.20 m long having a di
zzz [600]

Answer:

Heat flux of CO₂ in cgs

                 = 170.86 x 10⁻⁹ mol / cm²s

SI units

       170.86 x 10⁻⁸ kmol/m²s  

Explanation:

4 0
3 years ago
Which is not required when working in a manufacturing facility?
Artyom0805 [142]
Flip flops are not required
5 0
3 years ago
Other questions:
  • The number of weaving errors in a twenty-foot by ten-foot roll of carpet has a mean of 0.8 What is the probability of observing
    6·1 answer
  • The density of a fluid is given by the empirical equation rho 70:5 exp 8:27 107 P where rho is density (lbm/ft3 ) and P is press
    6·1 answer
  • The flowchart below shows the design steps required to build a working model.
    6·1 answer
  • Consider a very long, cylindrical fin. The temperature of the fin at the tip and base are 25 °C and 50 °C, respectively. The dia
    14·1 answer
  • Helium gas expands in a piston-cylinder in a polytropic process with n=1.67. Is the work positive, negative or zero?
    8·1 answer
  • What major financial flop led to the end of the Sega Dreamcast and ultimately caused Sega to stop making game consoles altogethe
    15·1 answer
  • ¿Cuál es el objetivo de la participación del gobierno en la economía?
    6·1 answer
  • Which step in the engineering design process likely broke down in the following scenario?
    14·1 answer
  • Find the remaining trigonometric function of 0 if
    13·1 answer
  • Algorithm for sum 2+4+6+….+n
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!