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
slava [35]
3 years ago
5

Consider the following code:

Computers and Technology
1 answer:
pishuonlain [190]3 years ago
7 0

In python the % operator is modulo. Modulo returns the remainder of two numbers.

19 % 5 = 4 therefore,

print(x%y) would output 4

You might be interested in
During spring in Colorado, ice on the mountain tops melts into water. Some of this water gets trapped in cracks in the mountain
zlopas [31]
Physical weather. It isn't changing the the chemical or biological make up.
3 0
3 years ago
Read 3 more answers
It is important organic mineral that is found in the soil as ash​
loris [4]

Answer:

Calcium is the most abundant element in wood ash and gives ash properties similar to agricultural lime. Ash is also a good source of potassium, phosphorus, and magnesium.

7 0
2 years ago
Read 2 more answers
Which of the following is NOT used to describe rhythm?<br> Beat<br> Pitch<br> Tempo<br> Meter
PtichkaEL [24]

Answer:

pitch

Explanation:

Rhythm is, by definition, a strong, regular, repeated pattern of movement or sound. This means that it's a pattern of one thing.

Out of beat, pitch, tempo, and meter, three of them have one thing in common when corresponding to rhythm: monotony. Monotony is the same thing, unchanged in sound and movement.

For example, drawing a straight line continuously.

Beat is a main accent or rhythmic unit in music or poetry.

Pitch is the degree of highness or lowness of a tone.

Tempo is the speed at which a passage of music is or should be played.

Meter is  the rhythm of a piece of poetry, determined by the number and length of feet in a line.

When you listen to music, a rap, or poetry, you can "feel the beat." This means you can pick out the main sound being accentuated, like the "boom-boom-boom" or a clapping track.

Tempo is how fast something goes. A slow song played at a ballet may be different than a rap song, which is fast. Tempo is the speed.

Meter is the rhythm, usually in poetry. It's like a beat and other patterns in the poem.

Pitch is the one that is different. It changes the tone. For example, a high note vs. a low note. That's pitch. When someone swallows helium and talks, their voice is now "high-pitched" because it has a higher-sound tone.

Rhythm does not change—it's a pattern of beats, tempos, and rhythms. Unlike pitch, pitch is musical. Rhythm is not—it's just the pattern.

4 0
2 years ago
Read 2 more answers
Can someone please help i have no idea what’s going on in this code
Valentin [98]

Explanation:

The first 3 lines of code tell the user to input a 5 digit number (ex. 72,910) or a 1 digit number (ex. 3). The next 5 lines of code determine if it is a 5/1 digit number or not. If it is, it prints "Success!". The rest of the code just tells that if it's not a 5/1 digit number, and if it's not, it gives errors and tells the user to try again.

Hope this helps!

3 0
2 years ago
Create a dictionary that will hold AT LEAST 3 categories for food with at least 3 foods for each category. E.g. Fruits --&gt; Ap
RSB [31]

Answer:

  1. food_category = {
  2.    "Fruits": ["Apple", "Strawberries", "Orange"],
  3.    "Vegetables": ["Carrots", "Peas", "Onions"],
  4.    "Meats": ["Chicken", "Beef", "Mutton"]
  5. }
  6. for cat in food_category:
  7.    output = cat + ": "
  8.    for food in food_category[cat]:
  9.        output += food + ", "
  10.    print(output)
  11. answer = input("Do you want to add category or food (Y - Yes  N - No): ")
  12. while(answer == "Y"):
  13.    choice = input("New Category (N) or New Food (nf): ")
  14.    
  15.    if(choice == "N"):
  16.        new_cat = input("Enter new category name: ")
  17.        if(new_cat not in food_category):
  18.            food_category[new_cat] = ""
  19.    elif(choice == "nf"):
  20.        cat = input("Enter category: ")
  21.        new_food = input("Enter new food name: ")  
  22.        food_category[cat].append(new_food)
  23.    
  24.    answer = input("Do you want to add new category or food (Y - Yes N - No): ")
  25. print("All food categories: ")
  26. for cat in food_category:
  27.    print(cat)
  28. selected_cat = input("Select a category to view the food list: ")
  29. output = ""
  30. for food in food_category[selected_cat]:
  31.    output += food + ", "
  32. print(output)

Explanation:

The solution code is written in Python 3.

Firstly, create a food category dictionary data structure (Line 1 -5). Next, display all the food category and the food in each category (Line 7 - 11)

Next prompt user to feedback if they wish to add new category or new food (Line 13).

While the answer is yes prompt user to enter their choice, either category or food and use if else if statements to handle the choice made by the user. If the choice is new category, prompt user to enter new category name and check if the new category is already exist in the dictionary. If not, add that category to dictionary (Line 18 - 21).

If the choice is food, nf, prompt user to input food category and enter the new food name and add it to the food_category list (Line 22 - 25).

After that prompt user to enter if they wish to continue to add new data (Line 27).

After collecting all info from user, write a for loop to display all the categories (Line 29 - 31).

At last, prompt user to select a category and display all the food of the selected category (Line 33 - 37).

8 0
2 years ago
Other questions:
  • In the u.s.all financial institutions are required to conduct business at a physical location only
    9·1 answer
  • PLEASE HELP ITS DRIVERS ED
    8·2 answers
  • Which of the following is not true about designing classes? In order for class information to be printed instead of a memory add
    12·1 answer
  • Define a function below, sum_numeric_vals, which takes a single dictionary as a parameter. The dictionary has only strings for k
    12·1 answer
  • Select the correct answer
    14·1 answer
  • The Business Information Building Block feature is available in the _____ grouping on the Insert tab.
    13·1 answer
  • Code written by computer programmers is translated to binary code, so computers can understand the instructions. True or False
    7·1 answer
  • g Assume that this program is run on a processor with data cache of size big enough that the entire array arr can fit in the cac
    5·1 answer
  • Writing down your main ideas, subpoints, and supporting material, then using geometric shapes and arrows to indicate logical rel
    10·1 answer
  • What is e banking effects
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!