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
Ostrovityanka [42]
2 years ago
9

Give me a code that draws a house with a roof in python. Please Answer!!!

Computers and Technology
1 answer:
Varvara68 [4.7K]2 years ago
8 0

import turtle

window = turtle.Screen()

tr = turtle.Turtle()

tr.forward(100)

tr.left(90)

tr.forward(100)

tr.left(90)

tr.forward(100)

tr.left(90)

tr.forward(100)

tr.back(100)

tr.left(120)

tr.forward(75)

tr.right(78)

tr.forward(60)

window.mainloop()

In my code, we use the turtle module for the graphics to draw the house with a roof.

You might be interested in
2. Write a simple program in C++ to investigate the safety of its enumeration types. Include at least 10 different operations on
erastovalidia [21]

Answer:

Check the explanation

Explanation:

To solve the question above, we will be doing some arithmetic and bit wise operations on enum values. in addition to that, we are asserting the array with INTCOUNT  and also printing the size of array i.e 12 and we are adding BIG_COUNT enum value to 5 and the result is 25.

#include<stdio.h>

enum EnumBits

{

ONE = 1,

TWO = 2,

FOUR = 4,

EIGHT = 8

};

enum Randoms

{

BIG_COUNT = 20,

INTCOUNT = 3

};

int main()

{

// Basic Mathimatical operations

printf("%d\n",(ONE + TWO)); //addition

printf("%d\n",(FOUR - TWO)); //subtraction

printf("%d\n",(TWO * EIGHT)); //multiplication

printf("%d\n",(EIGHT / TWO)); //division

// Some bitwise operations

printf("%d\n",(ONE | TWO)); //bitwise OR

printf("%d\n",(TWO & FOUR)); //bitwise AND

printf("%d\n",(TWO ^ EIGHT)); //bitwise XOR

printf("%d\n",(EIGHT << 1)); //left shift operator

printf("%d\n",(EIGHT >> 1)); //right shift operator

// Initialize an array based upon an enum value

int intArray[INTCOUNT]; // declaring array

// Have a value initialized be initialized to a static value plus

int someVal = 5 + BIG_COUNT; //adding constant and BIG_COUNT variable

printf("%d\n",someVal); //value will be 25

printf("%d",sizeof(intArray)); //value will be 12

return 0;

}

Kindly check the attached image below for the Code and Output Screenshots:

6 0
2 years ago
What process sends ones and zeroes across network cables
sergejj [24]

Answer:

modulation

Explanation:

Modulation is the procedure of encoding data into electrical signals for transmission through a media. For transmission, binary information, denoted by a sequence of ones and zeros, should be translated to analog or digital electrical signals. The method converts data into electrical signals suited for transmission is known as modulation.  Digital modulation is the transmission of binary signals zeroes and ones.

5 0
1 year ago
Page _____ refers to whether a page is laid out vertically or horizontally.
Nostrana [21]
Page orientation is the answer and can you please help me with my java questions
8 0
3 years ago
_______ is the remote performance of medical exams, consultations, health monitoring and analysis using special medical equipmen
laila [671]

Answer:

eHealth.

Explanation:

eHealth or electronic health is a digital medical platform used to connect individuals to medical treatment they so need but can not receive due to certain barriers.

The eHealth platform uses modern day technology for consultation, examination of patient's health, prescription of medication etc. But it refers patients to trusted medical facilities when the situation is critical.

All these are done electronically through the internet and has eliminated the boundaries of geographical location.

8 0
3 years ago
A predictive data analyst___.
fgiga [73]

Answer:

C. analyzes data and trends and predicts future data and trends.

Explanation:

Predictive analytics can be defined as a statistical approach which typically involves the use of past and present data ( factual informations) in order to determine unknown events or future performances of a business firm or organization. It is focused on determining what is likely to happen in the future.

For example, a data analyst trying to determine how to effectively stock his company's warehouses incase of an anticipated pandemic and he's using current sales data to project the demands.

Hence, a predictive data analyst is an individual who analyzes data and trends and predicts future data and trends.

3 0
3 years ago
Other questions:
  • 1. What is the main factor that affects Earth’s average temperature?
    12·1 answer
  • How do you ask brainy a question without it not liking the question and saying it hurts their feelings?
    14·1 answer
  • What protocol communicates data between routers representing the edges of autonomous systems?Distance-vectorLink stateInterior g
    11·1 answer
  • One common method of converting symbols into binary digits for computer processing is called ASCII​ (American Standard Code of I
    5·1 answer
  • Fill in the blanks with given words:{system unit / desktop / laptop / tablet / smartphone}1. A _____ can be as powerful as a des
    11·1 answer
  • A(n) _____ is a request for the database management software to search the database for data that match criteria specified by th
    15·2 answers
  • Write a program that simulates flipping a coin to make decisions. The input is how many decisions are needed, and the output is
    14·1 answer
  • To give your app users the ability to open your app directly from other apps by clicking a link, you should use:.
    11·1 answer
  • Why do you usually find domain names instead of IP addresses in a URL? Select one: a. An IP address would make your web page loa
    11·1 answer
  • What would a good digital citizen do if he sees his classmate left her email account open on a school computer by mistake?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!