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
lutik1710 [3]
3 years ago
13

Why is this python code giving me problems?

Computers and Technology
1 answer:
Andreyy893 years ago
4 0

Answer:

The answer to this question is given below in the explanation section.

Explanation:

The given code in this program has syntax errors.

In the given code, at line 1, input will cast or convert to int. It will generate an error on the second line because integer numbers can't be rounded. In simple, integer numbers don't have decimals. So, to correct the line you must use float instead of int.

In the second line, you need also to emit the int casting, because you have already converted the input into the float. In line 3, the second parameter to print function is num3, not x.

So the correct lines of the python code are given below:

num3 = float(input("Please input a decimal number:"))

num3 = (round(num3, 2))

print ("your decimal rounded to the 2nd decimal place is:", num3)

When you will run the above bold lines of code, it will run the program successfully without giving you any syntax and semantic error.

You might be interested in
Anyone wanna join a supercar/hypercar enthusiast's club?
stellarik [79]

Answer:

I have Lamborghini Centenario as my profile pic. :)

Explanation:

7 0
4 years ago
Video-sharing sites such as youtube and vimeo provide a place to post short videos called clips, true or false?
yaroslaw [1]
<span>It is true that video-sharing sites such as Youtube and Vimeo provide a place to post short videos called clips. Nowadays, these videos aren't only short, because even full-length movies can be posted on Youtube. This platform has become an important place for contemporary creators given that it provides them with a location and money to share their creative thoughts with the world. Youtube is becoming more and more important today, which is obvious if you take a look at the number of visitors each month and the money that Youtube earns from its creators.</span>
4 0
4 years ago
Select the pieces of information that are added on to data to get it where it is going.
oksian1 [2.3K]

Answer:

IP address and MAC address

Explanation: The IP address tells the server what network to send the information to, the MAC address tells the local network what device to send it to.

5 0
3 years ago
What is the different between the patch Tool and the Headling Brush tool?​
KonstantinChe [14]

Answer:

Explanation:

The Healing Brush and Patch tools add extra features. They match the texture, transparency, lighting, and shading of the sampled area. Instead of replacing them, pixel for pixel, like the clone stamp. This causes the painted pixels to blend seamlessly into the rest of the image. Using the Healing Brush tool: 1. Select the Healing Brush tool in the toolbox.

7 0
3 years ago
Hey guys im just curious.... whats ur favorite number
Oksana_A [137]

Answer:

13

Explanation:

8 0
3 years ago
Read 2 more answers
Other questions:
  • He primary purpose for attackers to send port scanning probes to hosts is to identify which ports are open. true false
    5·1 answer
  • If you have a rubric, “your teacher can prove you knew what you were supposed to do.” T/F
    10·2 answers
  • Greyer Corp, manufactures surgical instruments. Systems Medico Inc. enters into a contractual arrangement with Greyer that allow
    7·1 answer
  • On net, is technology good or bad for society? Please explain, support your argument, I’ll mark brainliest
    9·2 answers
  • Write multiple if statements: If carYear is before 1967, print "Probably has few safety features." (without quotes). If after 19
    11·1 answer
  • The challenge of preparing for ____________________ is in ensuring that employees do not feel that they are being prepared for t
    7·1 answer
  • Kristi, an event planner, wants to store caterers’ names and contact information in an organized manner. Kristi will MOST LIKELY
    13·1 answer
  • The cost of a postsecondary education increases with the length of time involved in the program.
    10·1 answer
  • What is the most appropriate data type for each of these items?
    15·1 answer
  • Significant design efforts, during deliberate planning at combatant commands, produce results as those commands _____. (Select a
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!