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
saul85 [17]
3 years ago
6

I am doing 7th grade coding 3.02 assignment can anybody help me it says bad input on line 3 and this is what it is can someone h

elp me
grade = int(input("What grade are you in?"))
Computers and Technology
1 answer:
Alchen [17]3 years ago
7 0

Answer:

grade = int(input("What grade are you in?")

if grade == 9:

print ("Freshman")

elif grade == 10:

print ("Sophomore")

elif grade == 11:

print ("Junior")

elif grade == 12:

print ("Senior")

else:

print ("Invalid")

Explanation:

You fail to provide the complete code. So, I will rewrite the code from scratch

The complete question requires that the level is printed based on the input grade.

The code has been added in the answer section.

The explanation is as follows:

[Thus gets input for grade]

grade = int(input("What grade are you in?")

[If grade is 9, this prints Freshman]

if grade == 9:

print ("Freshman")

[If grade is 10, then level is sophomore]

elif grade == 10:

print ("Sophomore")

[If grade is 11, then grade is Junior]

elif grade == 11:

print ("Junior")

[If grade is 12, then level is senior]

elif grade == 12:

print ("Senior")

[All other inputs are invalid]

else:

print ("Invalid")

You might be interested in
JAVA QUESTION::
allochka39001 [22]

Answer:

3) 44 10 44

Explanation:

Given data

int [] val = { 3, 10, 44 };

The total number of parameters of given array are 3, so total length of array is also 3.

The indexing of array starts with '0', Therefore the <u>indexes</u> of array with length zero are: {0,1,2}

The value of array at index 0 is = 3

similarly

value at index 1 = 10

value at index 2 = 44

Any value of index 'i' of an array is selected using array[i].

Therefore,

val[0] is selecting the value of array located at index '0'.

val[0] = 3

val[2] is selecting the value of array located at index '2'.

val[2] = 44

Finally,

val[0] = val[2]; is copying the value placed at index 2 (44) to value placed at index 0 (3). Hence, the output would be { 44 10 44}. So 3rd option is correct.

 

8 0
3 years ago
You have been asked to delete some data from medisoft but find that there is no delete button. what is another method you can us
makkiz [27]
You can try shift +delete, backspace key or highlight text and delete are the ones I know.
7 0
3 years ago
Define the missing method. licenseNum is created as: (100000 * customID) licenseYear, where customID is a method parameter. Samp
g100num [7]

Answer:

I am writing the program in JAVA and C++

JAVA:

public int createLicenseNum(int customID){  //class that takes the customID as parameter and creates and returns the licenseNum

       licenseNum = (100000 * customID) + licenseYear;  //licenseNum creation formula

       return(licenseNum);     }

In C++ :

void DogLicense::CreateLicenseNum(int customID){ //class that takes the customID as parameter and creates the licenseNum

licenseNum = (100000 * customID) + licenseYear; } //licenseNum creation formula

Explanation:

createLicenseNum method takes customID as its parameter. The formula inside the function is:

licenseNum = (100000 * customID) + licenseYear;

This multiplies 100000 to the customID and adds the result to the licenseYear and assigns the result of this whole expression to licenseNum.

For example if the SetYear(2014) means the value of licenseYear is set to 2014 and CreateLicenseNum(777) this statement calls createLicenseNum method by passing 777 value as customID to this function. So this means licenseYear = 2014 and customID  = 777

When the CreateLicenseNum function is invoked it computes and returns the value of licenseNum as:

licenseNum = (100000 * customID) + licenseYear;

                     = (100000 * 777) + 2014

                     = 77700000 + 2014

licenseNum = 77702014                                                                                                        

So the output is:

Dog license: 77702014          

To call this function in JAVA:

public class CallDogLicense {

public static void main(String[] args) {//start of main() function

    DogLicense dog1 = new DogLicense();//create instance of Dog class

dog1.setYear(2014); // calls setYear passing 2014

dog1.createLicenseNum(777);// calls createLicenseNum passing 777 as customID value

System.out.println("Dog license: " + dog1.getLicenseNum()); //calls getLicenseNum to get the computed licenceNum value

return; } }

Both the programs along with the output are attached as a screenshot.

3 0
3 years ago
Read 2 more answers
The process of bringing data or a file from one program to another is called
Digiron [165]
The answer is importing
8 0
2 years ago
Read 2 more answers
What is the process viewing files in chrome web browser cache?
Andreyy89

Step 1. Click the address bar at the top of your Google Chrome window, type "About: cache" into the box and press "Enter." A page will appear with a list of cached files and their addresses.

Step 2. Press the "Ctrl" and "F" keys on your keyboard at the same time to open the find bar.

Step 3. Type part of the name or address of a cached file into the find box and press "Enter" to find it. Continue pressing "Enter" to page through any matching results.

Step 4. Select the full address of the cached file on the page with your mouse and press "Ctrl" and "C" at the same time to copy the address.

Step 5. Click the address bar, press "Ctrl" and "V" at the same time to paste the address and press "Enter" to load the file. Chrome loads the file from the cache.

Step 6. Right-click the image, page or script and select "Save As" to save the cached file to your computer.

6 0
2 years ago
Other questions:
  • Smart art can be used to create _____that highlights relationships betweeen two items
    8·2 answers
  • End user needs assessment is a formal procedure to analyze a user's computer needs; it involves a specific set of steps that are
    8·1 answer
  • Integer indexing array: Weekend box office The row array movieBoxOffice stores the amount of money a movie makes (in millions of
    11·1 answer
  • Unleashes the ability of each person on their team to improve performance, solve problems, and
    6·2 answers
  • Michael needs to ensure that those items that are automatically archived are still easily accessible within Outlook. Which optio
    5·2 answers
  • Consider the following incomplete method. Method findNext is intended to return the index of the first occurrence of the value v
    15·1 answer
  • Do anyone else receive random points from Brainly… because I swear I had like 2K+ something and I check and Im at ACE… and with
    10·1 answer
  • Explain how communication facilitate cordination​
    14·1 answer
  • According to Chargaff's data, ________ must pair with ________, and ________ must pair with ________.
    8·1 answer
  • How can I master networking my home/business computer(s) - Tv's - iot devices and make the whole system as secure as possible?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!