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
igomit [66]
3 years ago
12

PYTON CODERS I NEED HELP I WILL GIVE BRAINLIEST!!! Why is this python code giving me problems?

Computers and Technology
1 answer:
NARA [144]3 years ago
4 0

Answer:

num3 = float(input('Insert a decimal: '))

num3 = round(num, 2)

print(f"You rounded decimal is: {num3}")

Explanation on why this works:

This block of code resembles a decimal from user input and round it to its nearest 10th. Let me explain the flaws in the original:

>>> num3 = int(input("Please input a decimal number:")

On this line of code you put it as the user input will be transferred to an int when in reality it should be a decimal float so we can round it later in the program. so it should be:

>>> num3 = float(input("Insert a decimal: "))

Second Line of code:

>>> num3 = int(round(num3, 2))

In this case, the int() function is not needed. so just remove and its good.

Lastly you used:

>>> print("your rounded decimal is: ", x)

Which is perfectly fine. Two more ways to output the same thing is by using:

>>> print(f"You rounded decimal is: {num3}")

Or just use the format() string method:

>> print("You rounded decimal is: {0}", num3)

You might be interested in
Explain what happens if you try to open a file for reading that does not exist.
ZanzabumX [31]

Answer:

Exception is thrown and the file is created with 0 length.

Explanation:

While opening a file there is an error occur which shows the file does not exist that means an  exception is thrown.

And this error can be occur when the size of the file is very very low means the file is a size of 0 length. So to avoid this error we have to exceed its length from the zero length.

8 0
3 years ago
List three social implications of the wider range of piracy​
liraira [26]

Answer:

Street prices are affected by the extent of illegal commercial copying. The availability of inexpensive, high-quality illegal copies reduces the demand for legal copies to the extent that some users buy illegal copies instead of legal ones.

7 0
3 years ago
What is the highest numeral in a binary code?
Anarel [89]

Answer:

The highest numeral in binary code is 1

In binary, you can only have 1s and 0s

if you're asking for the biggest number that can be represented, it's 255, which is 11111111. (this is 8 1s)

Explanation:

Is this a trick question? lol

May I have brainliest please? :)

5 0
3 years ago
Histogram 9AMAA 12/01/2021.
pshichka [43]
??????? I don’t get this
5 0
3 years ago
A network of Bennetton retail sales agents select the Bennetton designs that they feel will appeal to Bennetton retail customers
denpristay [2]

Answer:

It is an example of a matrix structure

Explanation:

The matrix structure is a structure in which jurisdiction, controls and duties are carried and uphold by a group of employees instead of just the manager.

In other words, employees have dual reporting relationships; they can give reports to the functional manager and they can also give reports to the product manager.

The Bennetton design selected by the network of Bennetton retail sales agents made activities to be easily coordinated because, they have collectively performed the duty as a unit and this is one of the advantages of this form of the matrix organizational structure.

7 0
3 years ago
Read 2 more answers
Other questions:
  • Why does the hp computer not have Bluetooth?
    6·1 answer
  • What is after Windows 8.1
    11·2 answers
  • Which of the following is not true about search engine advertising?
    15·1 answer
  • Assume that you have created a class named DemoCar. Within the Main() method of this class, you instantiate a Car object named m
    12·1 answer
  • Write a program that asks the user to enter the size of a triangle (an integer from 1 to 50). Display the triangle by writing li
    14·1 answer
  • Which finger presses the Shift key on the keyboard?
    6·2 answers
  • A(n) _______ gate provides an output of 1 if either or both inputs are 1.
    14·2 answers
  • An IT suspects that an unauthorized device is connected to a wireless network. This is a result of passkey sharing on a device b
    14·1 answer
  • There are parallels between the trust models in Kerberos and Public Key Infrastructure (PKI). When we compare them side by side,
    15·1 answer
  • You are the IT administrator for a small corporate network. The employee in Office 2 is setting up a virtualization environment
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!