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
dolphi86 [110]
3 years ago
8

I need help with Python. The first image is the code and the 2nd is the output.

Computers and Technology
1 answer:
Gekata [30.6K]3 years ago
4 0
The issue arises because the string you are trying to print is not a string, rather a float value. Item1, item2 and item3 are strong values (if you type some alphabets in it and not just numbers), but itemonecost, itemtwocost, and itemthreecost are explicitly type casted to float. In line 22, 23, and 24 you’re trying to print a float, by adding it with the string. One cannot add numbers to string. Rather you can type cast the itemcost to string while printing.

Add str(itemonecost) instead of itemonecost in print statement. Do this for other float variables too.

However do note that there are multiple ways to correct this issue, and I’ve just pointed one out.
You might be interested in
Carl is beginning a digital forensic investigation. he has been sent into the field to collect a machine. when he arrives, he se
postnew [5]

Answer:

Volatile memory analysis

Explanation:

volatile data analysis in a computer's memory dump memory forensics is used by information security specialists to examine and identify assaults or harmful actions that leave no clearly identifiable trails on hard disk data which os what Carl decides to preserve as much data as possible by capturing data in memory

6 0
2 years ago
Which of te following ranges of cells is correctly named
Natasha_Volkova [10]
D it is because its .a5.g1
3 0
3 years ago
Rubbing two sticks together to make a fire is an example what
Jet001 [13]
Rubbing two sticks together will cause friction
7 0
3 years ago
Read 2 more answers
How do you change the order of the slides in your presentation within the outline pane? Drag icon up or down Delete slide icon C
Amiraneli [1.4K]

Answer:

Rearrange the order of slides

In the pane on the left, click the thumbnail of the slide that you want to move, and then drag it to the new location. Tip: To select multiple slides, press and hold Ctrl while you click each slide that you want to move, and then drag them as a group to the new location.

Explanation:

7 0
3 years ago
What are the five elements of video production
goldenfox [79]
Answer: sight, color, emotion, sound, motion
3 0
3 years ago
Read 2 more answers
Other questions:
  • Describe the following software process models using your own words .Your explanation should also provide an example of a softwa
    12·1 answer
  • Technician a says that the above illustration shows one method used to keep the chain tension tight in an indirect drive camshaf
    8·2 answers
  • Print a countdown from n to 1 The function below takes one parameter: an integer (begin). Complete the function so that it print
    8·1 answer
  • Accessing a computer system by using several words is known as​
    13·2 answers
  • State and give reason, if the following variables are valid/invalid:
    12·1 answer
  • 31. Explain what the program does. Write out the output 20 PRINT "Hellooo00000000000, world!" 30 PRINT "I'm learning about comma
    7·1 answer
  • Write a list comprehension that creates a list containing the numbers that result from the values 1 through 10 being multiplied
    15·1 answer
  • Software that enables the organization to centralize data is called A. Data Repository B. Data Base Management System C. Data Wa
    6·1 answer
  • What does the following loop do? val = 0 total = 0 while (val < 10): val = val + 1 total = total + val print(total)
    15·1 answer
  • Refer to the exhibit. Host B on subnet Teachers transmits a packet to host D on subnet Students. Which Layer 2 and Layer 3 addre
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!