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
igor_vitrenko [27]
3 years ago
9

How to write an algorithm to find area and perimeter of diamond .​

Computers and Technology
1 answer:
Roman55 [17]3 years ago
3 0
Find the area of both triangles with 1/2•base•height then add them together
You might be interested in
Which would you use to get the number of elements in a dictionary?
Vikentia [17]

The function use to get the number of element in a dictionary is len.

<h3>What is a dictionary?</h3>

Dictionaries are used to store data values in key-value pairs. Dictionary are ordered.

Dictionary in python are express as follows:

my_dict = {"name": "Michael", "age": 28, "school": "Oxford"}

Therefore, the length of the element of the dictionary can be gotten using the len() function.

Hence,

print(len(my_dict)) will give you the length of the element.

learn more on dictionary here: brainly.com/question/14120893

#SPJ11

8 0
2 years ago
HELP PLEASE!!!
CaHeK987 [17]
We could create stuff to replace plastic like straws,Six pack rings, and other stuff so pollution would go down and less plastic in the ocean
4 0
3 years ago
Create the logic for a game that simulates rolling two dice by generating two random numbers between 1 and 6 inclusive. The play
guajiro [1.7K]

Answer:

The solution code is written in Python 3.

  1. import random  
  2. count = 0
  3. flag = False
  4. guess = int(input("Input your guess (2-12): "))
  5. while(count <=3):
  6.    dice1 = random.randint(1, 7)
  7.    dice2 = random.randint(1, 7)
  8.    if((dice1 + dice2) == guess):
  9.        flag = True
  10.    count += 1
  11.    
  12. if(flag):
  13.    print("User wins!")
  14. else:
  15.    print("Computer wins!")

Explanation:

A Random generator is needed for this question and therefore we start by importing Python random class (Line 1)

Next, create one counter variable,<em> count</em>, to ensure there will be only three rolling of the dices (Line 3).  We need another variable, <em>flag</em>, to track the status if the two dices equal to the <em>guess</em> number chosen by user (Line 4).

Next, prompt use to input a guess number (Line 5).

Within the while loop, we can use random class method <em>randint() to </em>generate random integer. The arguments 1 and 7 will give one random number ranged from 1 to 6 for <em>dice1</em> and<em> dice2</em>, respectively (Line 8 - 9).

If the total of<em> dice1 + dice2</em> equal to user <em>guess</em>, we turn the<em> flag </em>to <em>True</em>. If not, the <em>flag </em>will remain <em>False</em> after completing entire while loop.

If the <em>flag </em>turned to <em>True</em>, print the message "User Wins!" else print the message ("Computer wins!")

8 0
4 years ago
What is the name of a button on a website?
zhuklara [117]
May I know which button?
5 0
3 years ago
Why is this app here to help but wont let me see answers to my questions?
UkoKoshka [18]

Answer:

maybe you need to reload the page and press the little bell on the right side and u should get a notification when somebody answers your question and if that doesnt help go to your profile and press the tab (on this tab if that makes since) it should say sumin like questions you asked and u should press the ones u need the answers to

Explanation:

lmk if this helped

5 0
3 years ago
Read 2 more answers
Other questions:
  • You have no control over who view your post
    10·1 answer
  • Grace Hopper led the development of ______, a programming language for business applications.
    6·2 answers
  • What is the tallest dam in the united states of america?
    14·2 answers
  • PLEASE HELP ASAP!!
    6·2 answers
  • Write a C++ program that produces a simple personalized adventure game called Lost Fortune about a band of explorers that finds
    12·1 answer
  • ―Connectivity is Productivity‖- Explain the statements.
    8·1 answer
  • Activity 8. Direction: Read the article and make an outline. Be guided by the rubric for outlining. Write your answer on a separ
    15·1 answer
  • Elena wrote the following code in Scratch to have the sprite move and then turn around. However, the code does not work as expec
    5·1 answer
  • Which type of work would be a good candidate for improvement through automation?
    8·1 answer
  • What rpm command can be used to list the full paths for files within the bash package?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!