Car.py The Car.py file will contain the definition of a Car class. The Car class will hold information about the cars (make, model, year, and price). We will define the Car attributes as follows: make - string value representing the brand of the car (eg. Nissan, Tesla, Toyota, Ferrari). Your program must store this attribute in uppercase characters model - string value representing the model of the car (eg. Electra, Model3, Prius, Portofino). Your program must store this attribute in uppercase characters year - integer value representing the year of the car (eg. 2010, 2000, 1963) price - integer value representing the price value of the car (eg. 20000, 30000, 25000) You will write a constructor that allows the user to construct a Car object by passing in values for the make, model, year, and price. __init__(self, make, model, year, price) In addition to the constructor

Answers

Answer 1

The Car.py program is an illustration of constructors and classes in Python

Constructors are used to create the instant of objects

The program in Python

The program written in Python is as follows:

class Car:

make = ""

model = ""

year = 0

price = 0

def  __init__(self, make, model, year, price):

 self.make = make.upper()

 self.model = model.upper()

 self.year = year

 self.price = price

def display(self):

 print("Make = " + str(self.make.upper()))

 print("Model = " + str(self.model.upper()))

 print("Year = " + str(self.year))

 print("Price = " + str(self.price))

Read more about Python programs at:

https://brainly.com/question/26497128

#SPJ1


Related Questions

what ctrl to show the font dialog box​

Answers

Answer:

Ctrl + D key  [Same time]

Explanation:

Using this imput will allow you to see the font dialog box :D

Have a great day <3

Describe the ideal environment for a computer to work properly

Answers

The ideal environment for a computer to work properly is a cool place to avoid heating of the computer, good air circulation in the place so that the computer's fan can get cool air.

What is a computer?

Computer is an electronic device, that perform various of tasks easily that take humans much time.

It is a machine on which we can work and contains a screen and operators, like keyboard and mouse.

Thus, the ideal environment for a computer to work properly is a cool place to avoid heating of the computer, good air circulation in the place so that the computer's fan can get cool air.

Learn more about computer

https://brainly.com/question/21080395

#SPJ1

What is your favorite comedy show?

Answers

Answer:

Saturday Night Live or The Tonight Show

Explanation:

Which are true about using artificial intelligence? Select 2 options.

The user will always be able to figure out the computer's strategy.

The computer reaches a maximum level of skill.

Full implementation of AI is very complex.

The computer changes its performance based on experience.

The goal is that the computer will always win.

Answers

Answer:

Full implementation of AI is very complex, The computer changes performance based on experience

Explanation:

It's right, trust me.

Full implementation of AI is very complex, The computer changes performance based on experience. Thus, option C is correct.

What is artificial intelligence (AI)?

One of the requirements of a computer that can support artificial intelligence (AI) is that it should be able to deal with new situations based on previous learning. Artificial intelligence is when engineers try to discover different ways that they can use computers to perform tasks that a person otherwise would.

By doing this they are stimulating a computer to mimic these tasks and one day replace humans with certain activities with a robot. Even though the initial cloud computing services are just a decade old, a wide range of businesses, from small startups to multinational firms, government entities to non-profits, are already adopting the technology.

Therefore, Full implementation of AI is very complex, The computer changes performance based on experience. Thus, option C is correct.

To learn more about cloud computing, refer to the link:

brainly.com/question/29737287

#SPJ3

A student made a model of isostasy by placing a block of wood in a beaker of water. what does the wooden block represent in the model?

a. a glacier
b. earth's crust
c. sea level
d. earth's mantle

Answers

The answer is B., Earth’s crust :)

Answer:

D) Earth's mantle

Explanation:

Please create a new java package and class file for each problem. 1. Given the current array of numbers - [0,2,85,71,44,6,8,54,5,21], find the largest and smallest value in the unsorted array. 2. Given the current array of integers - [235,21,5,6,21,22,5,6,1,2,3], check if the array contains either 3 or 6. 3. Create an array which contains 20 integer values. Assign a ramdom value for each array element using a for loop . Find all duplicate interger values in an array

Answers

Answer:

¿Cómo se crear un objeto de una determinada clase en Java?

Para crear un objeto de una clase se usa la palabra reservada new. Por ejemplo, Rectangulo rect1=new Rectangulo(10, 20, 40, 80); new reserva espacio en memoria para los miembros dato y devuelve una referencia que se guarda en la variable rect1 del tipo Rectangulo que denominamos ahora objeto.

Explanation:

¿Cómo pasar un objeto de una clase a otra en Java?

Para clasificar un método de otra clase, necesitamos tener el objeto de esa clase. Aquí, tenemos una clase “Student” que tiene un método getName() . Accedemos a este método desde la segunda clase SimpleTesting usando el objeto de la clase Student

what special problems can occur with wireless networks

Answers

Distance from the router, as well as floors, walls, and large metal objects between a device and the router can interfere with wireless connectivity. Piggybacking, if you fail to secure your wireless network, anyone with a wireless-enabled computer in range of your access point can use your connection. Network congestion, Routers or other network equipment are overloaded with too much traffic. Speed Mismatch. This occurs when multiple users try to make use of the same server. I could go on and on.

Hope this helps!
Please give Brainliest!

Choose the missing term.

___ time

time.sleep(3)

1.form
2.insert
3.import

Answers

Answer:

import

Explanation:

the import keyword is used to import external modules into a python script.

You have implemented a network where each device provides all other devices on the network with access to shared files. What type of network do you have

Answers

Based on the above scenario,  the type of network that you have is known as the  peer to peer network.

What is  peer-to-peer network?

In this network, all the host can give network resources to other hosts or a form of access to  resources located on other hosts, and each host is said to often be in charge of controlling access to all these resources.

Note that Polling is a media access way where one device gives permission to other devices to access the network and as such, Based on the above scenario,  the type of network that you have is known as the  peer to peer network.

Learn more about peer to peer network from

https://brainly.com/question/10571780

#SPJ1

Pin number was changed and i let the culprit go without a kiss kiss how do i get it back

Answers

Answer:

I cant comprehend to even understand this

Explanation:

The concept of pirate radio led to the use of an online tool in which:

OA. music can be streamed or experienced online the instant it is captured.
B. musicians can adjust notes that are out of tune to make them sound better.

OC. artists can share news and concert dates with their current and future fans.

OD. friends can share audio or video files with other people on the Internet.

Answers

The concept of pirate radio led to the use of an online tool in which: A. music can be streamed or experienced online the instant it is captured.

What is a pirate radio?

Pirate radio can be defined as an illegal and unlicensed radio broadcast station that receives unauthorized communication signals across borders. Also, the transmission technique, mode, and power used by pirate radio were unauthorized.

Consequently, the concept of pirate radio led to the use of an online tool called "live streaming" in which music can be streamed or experienced online the instant it is captured.

Read more on pirate radio here: https://brainly.com/question/16724264

#SPJ1

You can click the tabs at the bottom of a workbook to switch between.

Answers

Notes or screens? I think

A spreadsheet program allows a user to _______. a. perform complicated calculations automatically b. deliver elegant presentation to a large audience easily c. organize, send, and retrieve e-mails quickly d. keep viruses from infecting their computers please select the best answer from the choices provided a b c d

Answers

Answer:

c

Explanation:

To ensure you don't forget your password, you should use one unique and safe password for all your accounts. a) True b) False

Answers

The answer is False you shouldn’t do that!

A company organizes all of its client database in order of the amount of money that the account is worth. When a new account is added, it is placed in the correct order in the database based on the worth of the account. Which classic algorithm would be best suited to perform this function

Answers

Answer:

The addition and count algorithm

Explanation:

The classic algorithm that would be best suited to perform this function is the insertion sort algorithm. The correct option is 2.

What is insertion sort algorithm?

Insertion sort is a simple sorting algorithm that is useful for sorting small databases because it is efficient for small datasets.

Iterating through an array or list and inserting each element into its proper position in the sorted sequence is how it works.

The database is sorted in this scenario based on the amount of money the account is worth. When a new account is added, it must be placed in the appropriate position in the sorted sequence.

Insertion sort can insert a new account into its correct position in the database while keeping the sorted order.

Thus, the correct option is 2.

For more details regarding insertion sort algorithm, visit:

https://brainly.com/question/13326461

#SPJ2

Your question seems incomplete, the probable complete question is:

A company organizes all of its client database in order of the amount of money that the account is worth. When a new account is added, it is placed in the correct order in the database based on the worth of the account. Which classic algorithm would be best suited to perform this function

Linear/Sequential Search Insertion Sort Selection Sort None of these

Help me with this question please

Answers

Nested loop im pretty sure

From the following illustration, explain what process it performs and what this has to do with the computer. Show an example for your answer.

Answers

Answer: information processing

Explanation:

Information processing is the process of changing or converting information into meaningful form. Information is a processed, organized or classified data which is useful for the receiver.

The user inputs date with input device for processing, it continues to output stage which is displayed by output device like monitor, then lastly stored on a storage material

Consider a career as a multimedia artist. is there a company, film, game, or band whose signature multimedia design work interests you? choose one of them and on the internet, research the company responsible for the development of that design, exploring the about pages to learn about the multimedia artists responsible. choose one or two of those artists and find out how they learned their craft. in particular, check to see if the artist(s) invented some feature of that design or a development method that helped complete the work they envisioned.

organize your work. write a minimum three-page paper and include a media presentation:

-a slideshow with at least ten slides;
-a video of at least four minutes;
-another medium form of your choice, making sure it is of comparable length; or
-a multimedia presentation combining an appropriate amount of each medium form.

Answers

Based on the scenario above, The career as a multimedia that I chose is Multimedia Designer.

Who are Multimedia artists?

This is known to be a person who uses  computer programs and illustrations to form graphics and also create animation.

Note that they help in the creation of movie, game and others such as visual effect.

A multimedia presentation is known to be a kind of presentation that uses a lot of forms of digital communication, such as video, and others.

Learn more about career from

https://brainly.com/question/15169081

#SPJ4

pivottable are based on?

Answers

A pivot table is known to be based on the summary of your data and it is one that  report on different topics or explore trends.

What is pivot table?

This is known to be a summary of one's data, that can be shown in a chart that gives one room to report on and look at trends based on one's information.

Note that It often shows the value of one item that is the Base Field and also the percentage of other item known to be the Base Item.

Learn more about from

https://brainly.com/question/2222360

#SPJ1

Alma will make the honor roll if she has at least a 3.80 GPA and misses less than 5 days of school in a year. In which of the following cases will Alma make honor roll?



1. Alma has a 3.84 GPA and misses 5 days of school


2. Alma has a 3.78 GPA and misses 2 days of school


3. Alma has a 3.68 GPA and misses 6 days of school


4. Alma has a 3.81 GPA and misses 3 days of school

Answers

Answer: 4. Alma has a 3.81 GPA and misses 3 days of school

Explanation: The others don't meet the requirments.

The only case where Alma will make honor roll is the fourth case where she has a 3.81 GPA and misses 3 days of school.

What is GPA?

GPA stands for Grade Point Average, and it is a measure of a student's academic performance in a given period.

It is calculated by assigning a numerical value to each grade received in a course and then averaging those values.

Based on the given criteria, Alma will make honor roll if she has at least a 3.80 GPA and misses less than 5 days of school in a year.

Alma has a 3.84 GPA and misses 5 days of school: Alma has the required GPA, but she misses 5 days of school which is greater than the allowed 5 days. Therefore, she will not make honor roll.

Alma has a 3.78 GPA and misses 2 days of school: Alma misses less than 5 days of school, but her GPA is less than the required 3.80. Therefore, she will not make honor roll.

Alma has a 3.68 GPA and misses 6 days of school: Alma misses more than 5 days of school, and her GPA is less than the required 3.80. Therefore, she will not make honor roll.

Alma has a 3.81 GPA and misses 3 days of school: Alma has the required GPA and misses less than 5 days of school. Therefore, she will make honor roll.

Thus, Alma will only make honour roll if she has a 3.81 GPA and misses three days of school in the fourth case.

For more details regarding GPA, visit:

https://brainly.com/question/15170636

#SPJ2

What's the best way to handle batteries when they become waste


Answer- Recycle them

Answers

Answer:

hi

what is the question in this?

you have already answered it yourself

File encryption is the science of writing the contents of a file in a secret code. your encryption program should work like a filter reading the contents of one file, modifying each character in the input file into a code, and then writing the coded characters out to a second file. the second file will be a version of the first file but written in a secret code. must be c++

Answers

Answer:

The second file will be a version of the first file, but written in a secret code. Although there are complex encryption techniques

Explanation:

The second file will be a version of the first file, but written in a secret code. Although there are complex encryption techniques

can I have some help?

Answers

Answer: String

Explanation: A int would be the for a number. A string is for word(s). Hope this helped!

Answer:

A is correct, it is widely used, and it also sounds good.

Explanation:

Strings are connected, such as coding and bricks. For example "A string of events." String is widely used in lots of subjects, including coding. It is also easy to spot.

Advantages of using Unicode to represent data

Answers

Global source and binary.
Support for mixed-script computing environments.
Improved cross-platform data interoperability through a common codeset.
Space-efficient encoding scheme for data storage.
Reduced time-to-market for localized products.
Expanded market access.

What is the purpose of a stock exchange? (Answer in your own words)

Answers

Answer:

Purpose of Stock Exchanges. Stock exchanges act as an agent for the economy by facilitating trade and disseminating information.

Explanation:

Write a program that calculates the amount of money a person would earn over a period of time if his or her salary is on one penny the first day, two pennies the second day and continues to double each day. The program should ask the user for the number of days. Display a table showing what the salary was for each day, then show the total pay at the end of the period. The output should bd displayed in a dollar amount, not the number of pennies. Must use for loop statement. Need to check the input value is correct, otherwise an error message is displayed. Display a nicely formatted table. Display the salary in dollar and cents

Answers

The program that calculates the amount of money a person would earn over a period of time if his or her salary as well as other factors inclusive is written below.

What is the program about?

The raw form of the program is:

#include <iostream>

using namespace std;

int main(){

   const int increment=2;

   int day;

   float penny=.01,

          total=0.0;

   cout <<"How many days have you worked? ";

   cin  >>day;

   while (day<1){

       cout<<"The number must be greater than 1.\n";

       cout<<"Enter again: ";

       cin >> day;

   }

   for (int i=1; i<=day;i++){

       total+=penny;

       cout <<" Day "<< i <<" "<< " $"<<penny<<endl;

       penny*=increment;

   }

    cout<<"Total salary for  "<<day <<" days = $" <<total<<endl;

Learn more about program from

https://brainly.com/question/23275071

#SPJ1

Explain why the connection times out despite adding the 'permit' statement for the End_User network to the ACL.

Answers

The connection timed out despite adding the 'permit' statement for the End_User network to the ACL because permission to be granted access was denied.

What is ACL?

ACL is an acronym for access control list which is the list of permissions that are related to the computer system network.

When an End-User is denied access to a network even after obtaining a permit statement, is could be that the End-User system has not been added to the list.

Learn more about network here:

https://brainly.com/question/26956118

You are creating a function that will test whether a number is greater than 10 using these lines of code:
if a < 10:
print(a "is greater than 10")

can you identify one syntax error and one logic error in these lines? why do you think a programmer might have made the logic error?

Answers

Answer:

There is no indentation on the second line -  Python needs indentation for if statements to work

The if statement is incorrect - We want the if statement to check if a is greater than 10 not less than 10

A programmer might have made this error by confusing the less than and greater than signs

(I'm assuming this is python)

which metric reports on how often a channel contributes to a conversion prior to last-click attribution?

Answers

Which metric reports on how often a channel contributes to a conversion prior to last-click attribution? Assisted conversion; Primary conversion; Last-click attribution; Second-to-last-click attribution .

Because of the Patriot Act of 2001, law enforcement officials:

OA. can access your email
activity more easily.

OB. must periodically check your online activity.

OC. are not authorized to monitor your emails.

OD. need permission to view your text messages.

Answers

Based on  the Patriot Act of 2001, law enforcement officials must periodically check your online activity.

What is the role of Patriot Act ?

The USA Patriot Act is known to be an Act that hinders and punishes terrorist attacks that is done in any part of the United States and abroad via enhanced law enforcement and others.

Therefore, Based on  the Patriot Act of 2001, law enforcement officials must periodically check your online activity to see if there is threat to national security.

Learn more about Patriot Act from

https://brainly.com/question/25741451

#SPJ1

Answer:

A, can access your email activity more easily

Explanation:

Trust me its correct

Other Questions
Can someone please help me understand this? explain why your selected African nation struggled to successfully shift to self rule The nation I chose is South Africa and the problems with self-rule is poverty and disease Samantha evaluates the expression -5.3 + 7.9 and gets an answer of 2.4.Is this a reasonable answer?A. Since - 5.3 rounds to -5 and 7.9 rounds to 7, the sum rounds to 2. Her answer of 2.4 rounds to 2. So, it is reasonable.B. Since -5.3 rounds to -6 and 7.9 rounds to 7, the sum rounds to 1. Her answer of 2.4 rounds to 2. So, it is reasonable.C. Since -5.3 rounds to -6 and 7.9 rounds to 8, the sum rounds to 2. Her answer of 2.4 is not equal to 2. So, it is notreasonable.D. Since -5.3 rounds to -5 and 7.9 rounds to 8, the sum rounds to 3. Her answer of 2.4 is not equal to 3. So, it is notreasonable. 1. What is an account executive and why are they important in Marketing and Advertising? 2. Who was Herbert F. "Herb" Lubalin and why is he important to the design industry? 3. Who was Milton Glaser, why was he famous? Which is the best paraphrase of capulets lines What is the answer please? Which word would best fit the connotation of the following sentence?The tired toddler was liable to become easily _________ if she did not get her way.persuadedhystericaltiredupset Which is a good example of the concern that ancient people had regarding what occurred in the afterlife?A) the indoor bathrooms in ancient EgyptB) Great Bath at Mohenjo-daro.C) the Code of HammurabiD) the pyramids in Egypt Find the measure of angle t Describe how the body responds to transplants and how doctors are able to successfully perform transplants.How do pain relievers work?increase production of white blood cellsincrease body temperatureblock messages within the nervous systemblock hormone production What is the solution to this system of equations? 3.2 x 0.5 y = 4.2. negative 1.6 x minus 0.5 y = 3.4. (4.75, 38.8) (4.75, negative 22) no solution infinitely many solutions The volume of a container is 576 cubic feet.The height is 6 feet; the width is 8 feet; findthe length. Whoever answers first i'll mark brainlistplease make sure it's right! please help!!I attached a picture! Put the following events in the order for a digital recording to become sound waves through a speaker. put the first event at the top of your list. What role do insurance companies play in arson cases? What is the range of F? How did Hamlet make sure that Rosencrantz and Guildenstern would be put to death instead of himself? If $300 is invested at a rate of 5% per year and is compounded quarterly how much will the investment be worth in 15 years? The area of a square-shaped rug is 81 sq feet. If the rug is 9 ft long, what is its perimeter? Explain. the battles of fredericksburg and chancellorsville both resulted in a victory for?A) the Union B) the confederacyC) neither side