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
podryga [215]
3 years ago
11

What type of error occurred with the code below??

Computers and Technology
1 answer:
Butoxors [25]3 years ago
6 0

Answer:

ValueError

Explanation:

The string 'five' holds characters that are not numeric, meaning it will raise ValueError since the function int() does not accept arguments that are strings with characters that are not numbers/numeric.

Hope this helps :)

You might be interested in
Convert the following denary numbers into binary using 8-bit register:
Mariana [72]

Answer:

1) 3

2) 5

3) 21

4) 57

5) 76

It would be much more easier if there were a grid containing all the numbers.

8 0
3 years ago
Encapsulate the following Python code from Section 7.5 in a function called my_sqrt that takes a as a parameter, chooses a start
Elden [556K]

Answer:

def my_sqrt(a):

   while True:

       x = a

       y = (x + a / x) / 2

       if (y == x):

           break

       else:

           x = y

   print(x)

   return 0

my_sqrt(5)

Explanation:

The above is a function in Python, and the exact copy as code of what is being given in the question. Its a method to find out the square root of a number which is a here. The while loop has been used as being mentioned in the question, and the variables are defined and calculated as being stated.

3 0
3 years ago
Write a program that determines the price of a movie ticket (similar to the one in the chapter). The program asks for the custom
goblinko [34]

Answer:

#include <iostream>

using namespace std;

int main() {

int age,time;

float price;

cout<<"Enter age:";

cin>>age;

cout<<"Enter time(in 24 hour clock for noon 1200):";

cin>>time;

if(age>13){

if(time<1700){

price=5;

}else{

price=8;

}

}else{

if(time<1700){

price=2;

}else{

price=4;

}

}

cout<<"Price: $"<<price<<endl;

}

Explanation:

Okay, here are the steps to be taken in order to be able to Write a program that determines the price of a movie ticket as given in details in the question above. Therefore, checked the steps below;

==> Input the age and the time.

==> If the age is not greater than 13, input the time(that is <1700) and follow it by imputing the price.

And if the age is greater than 13, you will also need to input the price. Just as below;

#include <iostream>

using namespace std;

int main() {

int age,time;

float price;

cout<<"Enter age:";

cin>>age;

cout<<"Enter time(in 24 hour clock for noon 1200):";

cin>>time;

if(age>13){

if(time<1700){

price=5;

}else{

price=8;

}

}else{

if(time<1700){

price=2;

}else{

price=4;

}

}

cout<<"Price: $"<<price<<endl;

}

6 0
3 years ago
How do you give the brainliest answer to someone?
Hatshy [7]
You click where the stars are and it says brainliest answer.
4 0
3 years ago
Read 2 more answers
Which are valid double statements for java? double a = 0; double b = -1.0; double c = -425; double d = 6340; double e = -1.0; do
NemiM [27]

Answer: 5

Explanation:5

7 0
3 years ago
Read 2 more answers
Other questions:
  • We may think of relationships in the E/R model as having keys, just as entity sets do. Let R be a relationship among the entity
    14·1 answer
  • What are the four basic operating principles of the information processing cycle?
    7·2 answers
  • You are a cleared employee. You discovered fraud and waste of money related to a classified program within your agency. If you r
    9·1 answer
  • Help pls<br><br> What type of link is used to call this file?
    5·2 answers
  • The CPU converts into information. The CPU is the mastermind of the computer, controlling everything that goes on through a seri
    12·2 answers
  • Write a program in which you input three numbers they canhave decimals so float values and the program gives you the minvalue ou
    8·1 answer
  • For what reason can security risks never be fully eliminated?​
    7·1 answer
  • What will be the output of the following code segment:
    12·1 answer
  • Heuristics are not always completely accurate.<br><br><br> Correct or wrong?
    10·2 answers
  • Answer pleaseeeeeeeeeee!
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!