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
Murljashka [212]
3 years ago
15

Why is this python code giving me problems?

Computers and Technology
1 answer:
dalvyx [7]3 years ago
6 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 (data type conversion), 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
5255555555555+55555555555555/1111*99442
Marina CMI [18]

Answer:

(502763134343429265 /101)

Explanation:

7 0
4 years ago
Read 2 more answers
Write a program that asks the user for his or her name, then asks the user to enter a sentence that describes himself or herself
emmainna [20.7K]

cheatercheatercheatercheatercheatercheatercheatercheatercheatercheatercheatercheater

7 0
3 years ago
Infrastructure as a Service (IaaS) replaces the _________ of the computer hierarchy with an Internet-based infrastructure.
snow_tiger [21]

Answer:

Digital level logic through machine level

Explanation:

Infrastructure as a Service can be regarded as computing cloud services that allows computation, storage, server in the cloud.it helps the user to access infrastructure in the cloud

Digital level logic which is in digital circuit that allows boolen expression, it allows signals as well as sequence to be expressed in form of numbers, it is usually view as been complicated but not.

It should be noted that Infrastructure as a Service (IaaS) replaces the Digital level logic through machine level of the computer hierarchy with an Internet-based infrastructure.

5 0
3 years ago
What is the fifth-generation wireless broadband technology based on the 802.11ac standard engineered to greatly increase the spe
kirza4 [7]

Answer:

The fifth-generation wireless broadband technology based on the 802.11ac standard is called the

5G.

Explanation:

The 5G is the newest baby in town in the area of wireless broadband technology.  The technology is based on the IEEE 802.11ac standard. 5G operates with a 5Ghz signal and is set to offer out-of-this-world speeds of up to 1 Gb/s.  This implies massive connectivity for everyone and everything.  However, its trial has been fraught with many challenges.  Questions have been raised, especially relating to some health concerns about the technology.  However, many advantages have been ascribed to this wireless technology.  They include more reliability, massive network capacity, increased availability, more uniform user experience, higher performance. and improved efficiency.

4 0
3 years ago
What are the uses of navigation keys​
Zolol [24]
The navigation keys allow you to move the cursor, move around in documents and webpages, and edit text.
3 0
2 years ago
Other questions:
  • Variable names may contain spaces and punctuation symbols. True False
    15·1 answer
  • Free points! your welcome
    9·2 answers
  • Dead state is the name of the time delay in a cpu caused by differences between the speed of the cpu and ram.
    15·1 answer
  • Select the correct answer from each drop-down menu. What skills should Tara hone to get a job in testing? Tara is a recent compu
    12·1 answer
  • Which collaboration website is best suited for social collaboration? www.media.iearn.org/projects www.meetup.com www.quest.nasa.
    9·1 answer
  • Which tasks can be completed using the Chart Tools Design tab? Check all that apply.
    9·1 answer
  • 80billion +2 TRILLION . PLEASE AWNSER
    7·1 answer
  • Which similar computer network components connect multiple devices?
    7·1 answer
  • ....................
    5·1 answer
  • What happen if ignore the unsafe markings in hand tools in ict​
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!