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
The ______ Works on a single variable or constant. *​
lora16 [44]

Answer:

man

Explanation:

6 0
3 years ago
Most shops require the technician to enter a starting and ending time on the repair order to track the actual time the vehicle w
Alecsey [184]

The time being referred to is C. cycle time. Cycle time refers to the amount of time from start to end of a process as agreed and defined by a service provider (in this case, the technician) and the customer. Cycle time can also be lengthened or shortened.

5 0
4 years ago
Read 2 more answers
Aaron is stating the main idea of what he read in his own words. He is _____.
Feliz [49]

Answer:

summarizing

Explanation:

when someone explains in their own words the main idea of a story, it is summarizing.

8 0
3 years ago
Read 2 more answers
Caleb is working on a simple logic-based program to simulate a game of tic-tac-toe. Which programming language would he use?.
noname [10]
The logic required to write a tic-tac-toe game can be achieved using any third-generation programming language, and there are many to choose from, for example, Python, Fortran, C++ etc. For a simple program where it is easy to add graphic objects, a fourth-generation programming language may be more suitable.
6 0
4 years ago
Read 2 more answers
I give brainliest.
dezoksy [38]

Answer:

D.

Explanation:

Code won’t <em>usually</em> recognize statements like humans do, code has to be consistent unlike human speech.

6 0
3 years ago
Other questions:
  • Which type of cell references are locked and NOT automatically updated when it’s copied
    8·1 answer
  • What are the advantages of a peer-to-peer network? Select all that apply.
    15·1 answer
  • What company uses the most storage?
    15·1 answer
  • GIVING 10 or 20 POINTS for brainliest HELP ASAP!! Instructions Click the links to open the resources below. These resources will
    10·1 answer
  • Who the heII is apsiganocj
    14·2 answers
  • arrange the following numbers from the highest to the lowest. ⅔,-7,0. no file or photo​
    8·1 answer
  • A web designer finds out after the launch that one of the external links did not have "http://' and therefore the link appeared
    6·1 answer
  • 36 points!!
    14·2 answers
  • What practice makes it virtually impossible to figure out the geographic location of a company?
    7·1 answer
  • I am trying to do a python code quiz for school, the basic requirements for the quiz are: the quiz MUST have 10 questions
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!