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
natita [175]
3 years ago
7

What are the 8 tips forhealthy living?​

Computers and Technology
2 answers:
disa [49]3 years ago
7 0

Answer:

Base your meals on starchy foods.

Eat lots of fruit and vegetables.

Eat more fish.

Cut down on saturated fat and sugar.

Try to eat less salt- no more than 6g a day.

Get active and try to be a healthy weight.

Drink plenty of water

Explanation:

Goshia [24]3 years ago
5 0

Answer:

Base your meals on starchy foods.

Eat lots of fruit and vegetables.

Eat more fish.

Cut down on saturated fat and sugar.

Try to eat less salt- no more than 6g a day.

Get active and try to be a healthy weight.

Drink plenty of water.

Explanation:

You might be interested in
Write a recursive method called, doMyMath, which takes as input any positive integer and calculates the factorial (use comments
gulaghasi [49]

Answer:

def doMyMath(n):  

    if n == 1:  

         return n  

    else:  

         return n*doMyMath(n-1)  

Explanation:

This line defines the function

def doMyMath(n):  

This line checks if n is 1. If yes, it returns n (1)

    if n == 1:  

         return n  

If otherwise, it calculates the fibonacci recursively

    else:  

         return n*doMyMath(n-1)  

To call the function from main, you can use:

print(doMyMath(5))

or

num = int(input("Number: "))   --- This gets the number from user

print("Result: ",doMyMath(num)) --- This calculates the factorial

<em>This question is answered in Python</em>

6 0
3 years ago
Type the correct answer in the box. Spell all words correctly.
tiny-mole [99]

Answer:

Modern CPUs contain multiple cores.  Think of it as multiple smaller CPU's on the single CPU chip.  The multiple cores can handle different processes in parallel allowing for multiple programs to be running at the same time.  This is not considered true multi-processing since the architecture still has a single I/O bus and can be subject to a single point of failure.  But the operating system will take advantage of the additional cores as if they were multiple physical CPU's - enhancing performance and productivity.

Explanation:

7 0
3 years ago
Papa Mario of Mario's Pizzeria has baked a huge pizza and cut it into n slices, but he is clumsy and the pizza wasn't evenly sli
rosijanka [135]

Suppose there are n student: 1, 2, 3, ..., i, ..., n.

Now, let's say each want slice size to be: t1, t2, ..., ti, ..., tn.

Let's pizza slices be : s1, s2, ..., si, ..., sn.

Now, it can be said that a student ' i ' will accept a slice of pizza ' si ' only if the size of slice is more then ' ti '.

Logic to distribute: what can be done is we can sort the demand i.e ti of students and also sort the size of pizza slices si. Now, Papa Mario can distribute the sorted slices to students sorted demand(smallest to heighest) one by one as they appear in sorted lists. Now, it will only be possible to distribute the slices to make everyone happy, if and only if in sorted lists of both s and t for each index k, it holds the condition: tk <= sk.

Let me explain you with example:

Lets says size of whole pizza is 100.

Now number of students n = 4.

Let there demands be : 20, 35, 15, 10.

This means 1st student atleast require the slice size of 20 and so on.

Case 1: Papa Mario divides the pizza into slices of size: 25, 20, 20, 35.

=> Now, we sort both lists.

Thus t => 10, 15, 20, 35

and s => 20, 20, 25, 35

Now, as we can see that for all index  tk <= sk, hence pizza can be distrubeted so that everyone can be happy.

Case 2: Papa Mario divides the pizza into slices of size: 30, 20, 20, 30.

=> Now, we sort both lists.

Thus t => 10, 15, 20, 35

and s => 20, 20, 30, 30

Now, as we can see that, for last student with demand of 35, the pizza slice alotted is of size 30, thus he is unhappy, and pizza cannot be distributed so that everyone becomes happy.

Now, after the approach, let's discuss question.

(a) Greedy algorithm paradigm is most appropriate for this problem, as what we are doing is greedily distributing small slices to those students which have least demands first then tackling bigger demands of students, by remaining bigger slices.

(b) As we are mainly sorting thel ist of sizes of pizza slices and student demands, thus we need to use an efficient algorithm to sort the lists. Such an efficient algorithm can be QuickSort() or MergeSort().

(c) Asymptotic running time of our algorithm would be O(n*logn).

3 0
3 years ago
) Consider the ambiguous CFG problem: given a context free grammar, does there exist a string that can be generated by two diffe
vodomira [7]

Answer:

See explaination

Explanation:

The post correspondence problem is: Given a_1, \ldots, a_n and b_1, \ldots, b_n , is there a sequence of indices 11. ..., im such that a_{i_1}\ldots a_{i_m} = b_{i_1}\ldots b_{i_m} .

To reduce from the PCP to the ambiguous CFG problem, do the following. Add some more symbols c_1, \ldots, c_n and define the following languages:

L_{A} = \{a_{i_1}\ldots a_{i_k}c_{i_k}\ldots c_{i_1} \mid k \geq 1\}

L_{B} = \{b_{i_1}\ldots b_{i_k}c_{i_k}\ldots c_{i_1} \mid k \geq 1\}

L_{AB} = L_A \cup L_B .

Define the following grammar for the language L_{AB} :

S \to S_{A} \mid S_{B}

S_A \to a_iS_Ac_i \mid a_ic_i, 1 \leq i \leq n

S_B \to b_iS_Bc_i \mid b_ic_i, 1 \leq i \leq n

It is easy to see that the given grammar generates the langauge L_{AB} . The reduction outputs the grammar thus constructed.

To see why this is a valid reduction, let there be a solution to the post correspondence problem, i.e. 11. ..., im such that a_{i_1}\ldots a_{i_m} = b_{i_1}\ldots b_{i_m} . Then the string a_{i_1}\ldots a_{i_m}c_{i_m}\ldots c_{i_1} = b_{i_1}\ldots b_{i_m}c_{i_m}\ldots c_{i_1} has two difference derivations in the given grammar, one using S_A and the other using S_B .

Conversely, let a string generated by the given grammar have two different derivations. Note that S_A and S_B can only generate one derivation tree for any string, hence the only way for two different derivations to happen is for one of them to go to S_A and the other to S_B .

Let the string for which ambiguity appears be of the form a_{i_1}\ldots a_{i_m}c_{i_m}\ldots c_{i_1} . Then the other derivation must produce a string of the form b_{i_1}\ldots b_{i_m}c_{i_m}\ldots c_{i_1} , this is because both derivations must produce the same string for ambiguity to occur, hence the part which uses c_i must be the same. Note that this further implies that a_{i_1}\ldots a_{i_m} = b_{i_1}\ldots b_{i_m} , which is equivalent to saying that the post correspondence problem has a solution.

Hence the reduction works as expected. This proves that the ambiguous CFG problem is undecidable, otherwise post correspondence problem would be decidable, which is a contradiction.

4 0
3 years ago
When using NAND gate instead of NOR gate in SR flip-flop, Q and Q’ both become one when?
Anika [276]

Answer:

  S and R both are 0

Explanation:

A <em>0</em> at the input of a NAND gate causes its output to be <em>1</em>. There is no other logic between the output NAND gate and the S or R inputs, so both inputs 0 will make both outputs 1.

4 0
4 years ago
Other questions:
  • Sleeping is an effect of _______ , but agitation may cause a person to wake up
    7·2 answers
  • Which osi reference model layer is responsible for transmitting information on computers connected to the same local area networ
    6·1 answer
  • A simple way to think of the Excel application is as a giant ______.
    5·2 answers
  • What does CMOS stand for?
    15·2 answers
  • Your task is to improve a multi-threaded program that frequently writes small entries to a shared file by introducing a layer th
    7·1 answer
  • The _____ row is typically the first row in a table.<br><br> banded<br> total<br> header<br> odd
    14·2 answers
  • Why is it important to have at least one backup stored off-site?
    8·1 answer
  • Displays unsolicited advertisements in banners or pop-up windows
    5·1 answer
  • Which UML relationships should be used between a subclass and a superclass? For example, suppose there is an interface or abstra
    5·1 answer
  • Creating Classes
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!