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
I NEED HEP QUICK
avanturin [10]

Answer:

O = (C2+C3+C4+C5)-81

Explanation:

5 0
2 years ago
Here is the list of problems to choose from:
olya-2409 [2.1K]

Answer:

There's a parking lot that is 600m² big. The lot must be able to hold at least 3 buses and 10 cars.

Each car takes up 6m² and each bus takes up 30m².

However, there can only be 60 vehicles in the lot at any given time.

The cost to park in the lot is $2.50 per day for cars and $7.50 per day for buses. The lot must make at least $75 each day to break even.

What is a possible car to bus ratio that would allow the lot to make profit?

3 0
2 years ago
There are several possible reasons why a high percentage of IT projects are abandoned-the business strategy changed, technology
aleksklad [387]

Answer:

a. True

Explanation:

The above listed information are part of the reasons why so many IT projects are abandoned by the business entities after a given period of time frame.

5 0
2 years ago
Which line of code will create an instance of the pet class?
Sunny_sXe [5.5K]

Answer:

myPetA = pet(self, 'dog', 'Spot')

Explanation:

I mite be wrong

8 0
2 years ago
Read 2 more answers
Given a sorted array of integers created on the heap, its size and a new integer, design a function which will enlarge the array
Debora [2.8K]

Using the computational language in C++ to write a code that will organize the values ​​in an array through a mathematical condition.

<h3>writing code in C++</h3>

<em>#include <bits/stdc++.h></em>

<em>using namespace std;</em>

<em>int getIndexInSortedArray(int arr[], int n, int idx)</em>

<em>{</em>

<em>/* Count of elements smaller than current</em>

<em>element plus the equal element occurring</em>

<em>before given index*/</em>

<em>int result = 0;</em>

<em>for (int i = 0; i < n; i++) {</em>

<em>if (arr[i] < arr[idx])</em>

<em>result++;</em>

<em>if (arr[i] == arr[idx] && i < idx)</em>

<em>result++;</em>

<em>}</em>

<em>return result;</em>

<em>}</em>

<em>int main()</em>

<em>{</em>

<em>int arr[] = { 3, 4, 3, 5, 2, 3, 4, 3, 1, 5 };</em>

<em>int n = sizeof(arr) / sizeof(arr[0]);</em>

<em>int idxOfEle = 5;</em>

<em>cout << getIndexInSortedArray(arr, n, idxOfEle);</em>

<em>return 0;</em>

<em>}</em>

See more about C++ at brainly.com/question/12975450

#SPJ1

7 0
2 years ago
Other questions:
  • When you make taffy (a pliable candy), you must heat the candy mixture to 270 degrees Fahrenheit. Write a program that will help
    6·1 answer
  • Which three phrases describe a wireframe
    12·1 answer
  • David uses Office Excel 2013 to calculate his average marks. He enters a formula in cell B5 to calculate the average based on th
    11·1 answer
  • Which of the following contains fair use?
    8·1 answer
  • When it comes to collecting and organizing prospect and account​ information, salespeople have a large variety of computer syste
    15·1 answer
  • Select all the correct answers. Which two statements are true about an OS? translates the user's instructions into binary to get
    10·1 answer
  • 6.   If you enter 234.567 into a cell that is formatted to display 1 decimal place, what is the value stored in the cell?
    15·2 answers
  • ITS MAKING ME TYPE URL CODES NOW!
    6·1 answer
  • Write a c++ program to calculate the approximate value of pi using this series. The program takes an input n that determines the
    13·1 answer
  • Question 2 of 10
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!