what is wrong with this python code? The syntax error is on the first line.






public class Box


{

private String myDate;

private String myContents;

private String myLocation;

public class Box(String date, String contents, String location)

{

myDate = date;

myContents = contents;

myLocation = location;

}

}

Box twentyThree = new Box("2016", "medical records", "storage closet");

Box zeroSeven = new Box(“2020”, “flu shot flyers", “receptionist’s office”);

Box twentyOne = new Box(“2018”, “lotion samples”, “waiting room”)

print (Box twentyThree = 1)

print (Box zeroSeven = 2)

print (Box twentyOne = 3)

Answers

Answer 1

class Box:

   def __init__(self, date="", contents="", location=""):

       self.d = date

       self.c = contents

       self.l = location

   def displayBox(self):

       if self.d != "":

           print("The date is " + self.d)

       else:

           print("The date was not supplied")

       if self.c != "":

           print("The contents are " + self.c)

       else:

           print("The contents were not supplied")

       if self.l != "":

           print("The location is " + self.l)

       else:

           print("The location was not supplied")

obj = Box("2016", "medical records")

obj.displayBox()

This is how you would create a class in python. Your code seems to be part python part some other language. I hope this helps!


Related Questions

Which item cannot be inserted into a header or footer of a document?

Answers

Answer:

All the above items can be inserted into either a header or a footer.

Please mark brainliest!

The items that cannot be inserted into a header or footer of a document is all the above items can be inserted into either a header or a footer. The correct option is d.

What is a header or footer?

A document is a type of information that can be stored electronically. Page numbers are generated automatically. Tables with columns and rows, pictures, shapes, and clipart can all be inserted into a document's header or footer. As a result, all of the items listed above can be inserted into the header or footer.

A header is text at the top of a page, whereas a footer is text at the bottom, or foot, of a page. Typically, these spaces are used to input document information such as the document's name, chapter heading, page numbers, creation date, and so on.

Therefore, the correct option is d, All the above items can be inserted into either a header or a footer.

To learn more about the header or footer, refer to the link:

https://brainly.com/question/4637255

#SPJ2

The question is incomplete. Your most probably complete question is given below:

Automatic page numbers

Tables with columns and rows

Pictures, shapes, and clipart.

All the above items can be inserted into either a header or a footer.

What can you do to prevent damage to a computer? Check all of the boxes that apply.

Keep your computer in a temperature- controlled room.

Tie cords in knots so they are shorter.

Dust your computer only when you see a buildup of dust.

Use surge protectors when you are away from home or school.​

Answers

Answer:

temperature-controlled room and surge protectors

Explanation:

Answer:

Keep your computer in a temperature- controlled room

Dust your computer only when you see a buildup of dust

Use surge protectors when you are away from home or school

Explanation:

just good

Part B
How would you classify a network formed by connecting two MANs together?
В І у хх Font Sizes А • А

Answers

Computer programming 2254518752669

What does a coder do on a daily basis?

Answers

medical charts and assinging codes

any song recommendations, pls dont say 6ix9ine or lil pump

Answers

I actually do have one tho. Try Megan Tha Stallion.

Answer:

smash mouth "all star" is my fave or Imagine Dragons "Whatever it Takes"

Explanation:

Why can the internet keep growing as more devices are added without decrease in performance?

Answers

Answer:

Explanation:

There may be many reasons why your internet speed is slow. Internet use requires a reliable connection between your device and the destination, which may be a server that is physically located on the other side of the world.Your connection to that server could pass through hundreds of devices on its journey. Each one of these is a potential failure, or weak point. If one point along this path isn’t functioning optimally, this can significantly affect your internet experience.

There are many reasons your Internet connection might appear slow. It could be a problem with your modem or router, Wi-Fi signal, signal strength on your cable line, devices on your network saturating your bandwidth, or even a slow DNS server. These troubleshooting steps will help you pin down the cause.

Which is the fastest way to make many formatting changes to a range of cells?
select each cell, right-click, use the ribbon to make changes
select the range, right-click, use the ribbon to make changes
select the range, right-click, format cells, make changes
select each cell, right-click, format cells, make changes

Answers

Answer:

c 3

Explanation:

c 3

Answer:

I believe it could be C

Explanation:

Please click "Thanks" if this helped in any way! :)

The background color indicates the background image of the web page.

True or false?

Answers

This is false. The background color refers to a solid color while the background image just an image.

The background color indicates the background image of the web page is false.

What is distinction among history and history photo?

In a history asset, you could upload history-color, repeat , no-repeat and different photo attributes, however withinside the history-photo assets you're most effectively allowed to feature photos. Show hobby in this post. By the usage of history, you want to specify a different arguments to set the history of the page.

The Background Color facts is saved for photo and image documents that have a color distinctive to the photo history. The history colour is, in maximum cases, displayed withinside the shape of an RGB triplet or a hexadecimal code.

Read more about the web page:

https://brainly.com/question/3700565

#SPJ2

Which search phrase is the most effective to find out about the most popular pizza chains worldwide in 2019?
A.
popular pizza chains in the world
B.
most popular AND pizza chains AND worldwide AND 2019
C.
the most popular pizzas “in the world today” AND 2019 AND chains
D.
2019 worldwide pizza chains “most popular in the world”

Answers

D I believe is correct

Answer:

D

Explanation:

How can I get coding with no experience?

Answers

With "no" experience? With help, yes! Although with nothing, it would be almost impossible.

What piece of equipment changes the signal from the television camera into an electronic signal?
receiver
transducer
transponder

Answers

Answer:

Transponder

Explanation:

Transponder - a device for receiving a radio signal and automatically transmitting a different signal.

Answer:

transponder isnt correct i took the quiz its one of the other 2

Explanation:

the correct answer is transducer

What is the difference between soft copy output devices and hard copy output devices​

Answers

the output printed on the paper is called hardcopy output. some examples are printer and plotter.

the output produced on display screen and audio sound is called soft copy output. some examples are moniter and speaker.

Hi guys, Im making a game. I want to make a collision event, but what is the code for making the wall and the box collide. I really need a quick and correct response. Pls support.

Answers

Answer:

i think its 3337

Explanation:

what is a cloud in the world of computing

Answers

Answer:

In the simplest terms, cloud computing means storing and accessing data and programs over the internet instead of your computer's hard drive

Explanation:

how do you give brianliest

Answers

Answer:

When you ask a question in brainly, two helpers will answer it, then on each answerer you'll find "mark as brainliest" button which looks like a crown.

Hope this helps :)

Question # 6
Math Formula
What is the output of this program? Assume the user enters 2, 5, 1, and 6.

numA = 0
for count in range(4):
answer = input ("Enter a number: ")
fltAnswer = float(answer)
numA = numA + fltAnswer
print (numA)

Answers

Answer:

14.0

Explanation:

The loop converts each answer to a float. The accumulator variable adds the values entered.  

2.0 + 5.0 + 1.0 + 6.0 = 14.0

Answer:

14.0

Explanation:

Edge 2021

girls question
who wants to go out ;p

Answers

MEEEEE PICK ME CHOOSE ME IM LONELY

Answer: I do

Explanation: *P.S.* I'm a Boy

Please Help!

Choose all items that are characteristics of placing nested elements on a new line, using indentation.


A) makes HTML errors difficult to find

B) not required by a web browser

C) can cause web page display errors

D) makes HTML analysis and repair easier

E) done automatically by HTML authoring software

Answers

Answer:

Its B,D,E

Explanation:

Got it right on e2020

Answer:

B). not required by a web browser

D). makes HTML analysis and repair easier

E). done automatically by HTML authoring software

Btw cause this class can be a pain here are the answers to the rest of the assignment.

Slide 7/12:

The missing element is

C). <p></p>

Slide 9/12:

The missing tag is:

B). an end (closing) a tag

Slide 12/12:

The missing character is

D). an angle bracket

Explanation:

I just did the Part 3 on EDGE2022 and it's 200% correct!

Also, heart and rate if you found this answer helpful!! :) (P.S It makes me feel good to know I helped someone today!!)

Which of the following You tubers uses the word "flip" as a curse word

A. Unspeakable
B.09Sharkboy
C. Moosecraft
D. All of the above

First correct answer get brainiest!

Answers

All of the above cause it’s fliped

MULTIPLE COICE! BRAINLIEST
When using design templates, these elements will be determined for you.
bullets
background
color scheme
content
title
font

Answers

Answer:

background

Explanation:

How did New York Governor Hugh Carey handle Sostre’s situation?

Answers

Answer:

The governor found a way to free Sostre without assessing whether or not he was guilty or innocent of drug crime in buffalo.

Explanation:

Answer:

The governor found a way to free Sostre without assessing whether or not he was guilty or innocent of drug crime in buffalo.

Explanation:

correct on e2020 Dawg

A peripheral can be used to tell a computer to complete a specific task.
A) True
B)False

Answers

Answer:

A. true

Explanation:

because you can complete it without it mistakes if your using an computer but if you use an paper you will make mistakes over and over

What are some options available in the Spelling and Grammar Checker? Check all that apply.

Redo
Undo
Ignore All
Ignore Once
AutoFormat
Add to Dictionary
Readability statistics

Answers

Add to Dictionary
kase ayun yung sa tingin kong tamang sagot soo yun na nga

Answer:

ignore all

ignore once

add to dictionary

Explanation:

took the assignment on edge2020

Before he buys a new smartphone, Tim can best use data to

evaluate which phone he should get.
convince himself he wants a phone.
discredit others’ opinions on his phone choice.
recognize problems that all phones have.

Answers

It’s A or the first one, kinda like process of elimination, the second and third one are obviously eliminated first so then it’s just between a and d. But a makes more sense as to he has to buy one either way

Answer:

A.) Evaluate which phone he should get

Explanation:

Edge2020

Which function will find the difference of 15 and 3 and return 12 when the main part of your program has the following line of code?

answer = subtract(15,3)

def Subtract(numA, numB):
return numA - numB

def Subtract(numA, numB):
return numB - numA

def subtract(numA, numB):
return numA - numB

def subtract(numA, numB):
return numB - numA

Answers

Answer:def subtract(numA, numB):

   return numA - numB

Explanation:

i got the right answer but i was willing to get it wrong for the right anwser for you

The function that will find an accurate difference of 15 and 3 and return 12 when the main part of your program has the following line of code is as follows:

def subtract(numA, numB):

       return numA - numB

Thus, the correct option for this question is C.

What is the significance of the output of the program?

The significance of the output of the program is understood by the fact that it delivers some values or concepts to the user with respect to the instruction he/she is given to the computer for processing. The output of the program is very specific in nature.

According to the question, you have to assume the value of number A as 15 and number B as 3. So, when you find the difference between these numbers, you get an output of 12.

You must follow the process as follows while framing a program:

def subtract(numA, numB):

         return numA - numB

Therefore, the correct option for this question is C.

To learn more about Output of a program, refer to the link:

https://brainly.com/question/18079696

#SPJ2

Select the correct answer.
What is a hyperlink?
A.
A bold link that goes back to a newspaper
B.
A link that clicks on itself
C.
A way to cite sources in an online article
D.
A special link on a smartphone

Answers

Answer:

c.

Explanation:

a link from a hypertext file or document to another location or file, typically activated by clicking on a highlighted word or image on the screen.

Answer:

c

Explanation:

came out my study guide and i made a 96 % on my 50 question test

Which best describes what happens when a formula is copied from one cell to another?
The cell references in the formula remain the same to match the cell that the formula is pasted into.
The cell references in the formula remain the same as they were in the original cell.
The cell references in the formula change to match the cell that the formula was copied from.
O The cell references in the formula change to match the cell that the formula is pasted into.
Hurry up

Answers

Answer:

b 2

Explanation:

b2

BRAINLIEST

When using design templates, these elements will be determined for you.
bullets
background
color scheme
content
title
font

Answers

Answer:

background

color scheme

font

I think thats all

Explanation:

Please give me Brainly

When using design templates, the elements that will be determined for you are color scheme and background. The correct options are b and c.

What is designing a template?

The template is creating a document that has a copy of itself. Design templates are ready-made layouts and written materials that can be altered.  For example, if you have a template of office content, then you can use it for another word document. You don't have to start from scratch.

In order to maintain consistency among users and media, templates are frequently created to adhere to certain rules or specifications. You can make new templates for later use, or utilize pre-designed templates from template libraries and websites.

Therefore, the correct options are b, background, and c, color scheme.

To learn more about template, refer to the link:

https://brainly.com/question/28193778

#SPJ2

Explain in details how Galen , a physician during the Middle Ages, expanded on Hippocrates' theory of the four humors and explain what he believed each other humor represented ?

Answers

Answer:

Galen expanded on the Hippocrates' theory of humor by assigning personalities, moods, behaviors, and emotions to the four humors. He believed blood stood for sanguine personality, black bile for a melancholic personality, yellow bile for a choleric personality and phlegm for a phlegmatic personality.

Explanation:

Hippocrates put forward the theory of the four humors. According to the theory, the human body is made up of four substances: black bile, yellow bile, blood, and phlegm. A healthy human body is the product of a balance of among the four humors, while diseases results if there is an imbalance among the four humors.

Galen, a keen admirer of Hippocrates' ideas, further elaborated on this theory and believed that they affected personalities, moods, behaviors, and emotions.

The personalities assigned the four humors are as follows:

People with predominantly black bile are Melancholic (corresponding to the season of autumn dry and cold): They are very sensitive, and enjoy artistic pursuits.

People with predominantly yellow bile are Choleric (corresponding to the season of summer, dry and hot): They possess a passionate temperament, They have a lot of ambition, energy, drive, enormous vitality but are domineering and get angry quickly.

People with predominantly blood are Sanguine (corresponding to the season of spring, wet and hot): These people are confident, joyful, optimistic, expressive, confident, rational and sociable.

People with predominantly phlegm are Phlegmatic (corresponding to the season of winter, wet and cold): They are deep thinkers, fair, calm, very consistent, relaxed, and observant, willing to compromise, and hard workers.

most 4 year colleges want an applicant's scores for all the following except

Answers

Answer:

IQ

Explanation:

Other Questions
I need help with finding the genuine brainly answers on here because i paid for premium answers and I still get incorrect on some of the mastery tests on plato I take. Ur genuine answers would be greatly appreciated. The benefits of effective listening are: What is the image of the point (7, -5) after a rotation of 270counterclockwise about the origin? Where will you find information about how cable-stayed bridges work?a.Build a bridgec.Contact Usb.Teachers guided.PBS home site You are purchasing a 30-year, zero coupon bond. The yield to maturity is 9.1 percent and the face value is $1,000. What is the current market price (assume annual coupons)? which of the following is NOT a warning sign of depression that may lead to S.ui.cideA. Being sad about your friend moving away 3 days agoB. A change in appetite for the last 3 monthsC. difficulty concentrating for the entire semesterD. quitting all of ones favorite activities and not joining other activities n which phase(s) of matter are the atoms closely packed but still able to slide past each other?gasliquidsolid and gasliquid and solid An electric current is passed through a sample of water, causing thesample to break down into oxygen and hydrogen. Given this information,what is the correct classification of water? Helpppppppppppppppppppp An economic system where the individual controls their business for the most part, but with some government control isknown as what?A MarketB CommandC Mixed, leaning-commandD. Mixed, leaning-market What are three advantages that the Longships had which enabled Vikings to successfully raid across Europe? what can historians learn from artifacts about American civilizations pre-1600? HELP PLEASEEE!! The publication of The Jungle by Upton Sinclair in 1906 was instrumental in gettingthe members of Congress to-enact stronger anti-trust laws support conservation of public lands establish a system of meat inspection legalize strikes by labor unions A large photograph displayed on a stores website would NOT qualify for fair use under which guideline? Sophia and Hector are captains of their track and field team. As captains, they help their teammates train for the different events.Sophia records the heights of the teammates competing in the high jump event and the heights of their best jumps.Height of teammate 5'4" 5'5" 5'5" 5'8" 5'10"Highest Jump 4'4" 4'8" 5' 5' 4'10"Is the height of a teammates jump a function of his or her height? Explain. Can you explain the difference between chronological order and compare and contrast text structure? How can clue words help you as a reader to find the difference between the two?PLZZZZZ HURRY. Using your knowledge of the power of the president answer the following question, if the president wants a new law created to change the current tax laws, but Congress does not pass the law the president wanted, what can the president do? A) The president can issue an executive order.B) The president can use judicial review to prompt congress to pass a new law.C) The president can impeach congress.D) The president can use a pocket veto. Which answer best describes the portion of the chart labeled M? 2011 FLVS (4 points)The president presents drafts of bills to the House of Representatives and the Senate.The president appoints subcommittees to review bills from the House of Representatives and the Senate.President receives bills from Congress which he approves or vetoes.The president reviews vetoed bills from Congress and can override the vetoes. Your salary used to be $37,000 per year.You earned a 2% raise. After the raise, your salary was per year. Help me! Ill mark you brainly and give extra points!