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
Marina86 [1]
3 years ago
13

I need help on what im doing wrong

Computers and Technology
1 answer:
laiz [17]3 years ago
6 0

Answer:

The error is that you're trying to convert a string with letters inside into an int. What happens if a user type in 'a' instead of '1'? 'a' is not a number so the int('a') would fail and give you an error. Make you add a line to check whether the input a number or not.

Explanation:

Change your code to

DEorAP  = input("Is it AP or DE?")

if DEorAP.isdigit()

  DEorAP = int(DEorAP)

You might be interested in
What does the following code do? Assume list is an array of int values, temp is some previously initialized int value, and c is
BigorU [14]

Answer:

Option D is correct.

Explanation:

Option D is correct because  when the condition  if (list[j] < temp) is tested it only gets true when element in list[] array at <em>jth</em> position is less than the value in <em>temp</em> and after that it increments the value of c by this statement: c++ and so c is incremented from 0 to as much times as much elements in list[] are lesser than temp.

6 0
4 years ago
Read 2 more answers
Whats the flow in this code, and whats the risk that its creating and what can i do to fix it? (c language)
Advocard [28]

Answer:

The risk is a buffer overflow.

Explanation:

Whatever the user passes as a command line argument, will be copied into the buffer. If the user passes more than 499 characters, the end of the buffer will be overwritten.

To solve it, compare the string length of argv[1] to 500 before copying, or even better, start using the new strcpy_s( ) function.

6 0
3 years ago
The ____________ is a wildcard character that is used to search for an unknown single character.
mafiozo [28]
Asteristik or as we see as (*)
5 0
3 years ago
Communication between a computer and a keyboard involves ______________ transmission.
4vir4ik [10]

Answer:

Simplex transmission

Explanation:

Communication between computer and keyboard involves which transmission? Answer: Simplex transmission requires communicating between a computer and a keyboard. The simple transmission & communication channel allows data from only one direction.

8 0
2 years ago
. Use one command to create a /sales directory with the permissions of 770
mars1129 [50]

Answer:

mkdir -m 770 sales

Explanation:

The command mkdir is used to create a directory and the attribute or flag

-m is used to  assign permissions on create a folder.

Example:

mkdir -m 770 sales

Create a folder with permissions 770 with name sales

7 0
3 years ago
Other questions:
  • If I deal seven cards from a standard deck of 52, what is the chance that I will get two triples (three of a kind) and one other
    11·2 answers
  • With landscape photography, which depth of field do you normally want? A) Small B)Small to Medium C)Large D)With landscapes it d
    7·2 answers
  • In which phase of the design process does the developer establish the project goals? A. Design B. Planning C. Development D. Lea
    15·2 answers
  • Which Windows system utility contains a comprehensive list of the devices connected to your computer and displays warning icons
    8·1 answer
  • Describe practices that enable software designers to think about using patterns?
    10·1 answer
  • Hard and soft skills can both be transferable skills. *<br><br> True<br><br> False
    5·2 answers
  • Software is the word for:
    15·1 answer
  • You have searched a database to locate US cities with population counts above 1 million people. You need to present the results
    6·2 answers
  • Which of the following will you do in step X in the following series of clicks to change the bounds of
    10·1 answer
  • Elena wrote the following code in Scratch to have the sprite move and then turn around. However, the code does not work as expec
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!