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
A _____ is an electronic path over which data can travel.
vazorg [7]
A bus is an electrical path which data travels between the different components in an electronic device.                                                                      
5 0
3 years ago
Mad Libs are activities that have a person provide various words, which are then used to complete a short story in unexpected (a
Marina86 [1]

Answer:

I am writing a C++ and JAVA program.    

import java.util.Scanner; //for using input output functions

public class LabProgram { // class name

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

Scanner input = new Scanner(System.in);

// creates input instance of  Scanner type

     String str;  // declares String type variable str for a string value

     int num;  // declares integer type variable num to hold an integer value

     str = input.next(); //scans and reads input string from user

     num = input.nextInt();  //scans and reads input integer from user

//while loop continues to execute until user enters quit 0

while(str!="quit" && num!=0) {  

/* prints the following message, for example if value of num = 2 and value of str = apples then the following print statement prints Eating 2 apples a day keeps the doctor away. */

System.out.println("\nEating " + num +" " + str + " a day keeps the doctor away.");

//takes string and integer as input again and keep taking input until user //enters quit 0

str = input.next();  

num = input.nextInt(); }   } }

Explanation:

The program is well explained in the comments mentioned with each statement of the program. The program simply prompts user to enter a string and an integer. The while loop keeps executing until user enters quit 0. The program keeps taking input string and integer from user and prints the message System.out.println("\nEating " + num +" " + str + " a day keeps the doctor away.");  The loop breaks when the use enters quit 0. The screenshot of the program along with its output is attached.

3 0
3 years ago
What is the FICO system?
Serhud [2]
It is C) A credit investment system.
8 0
3 years ago
Which of the following rules should be used to keep the appropriate distance between your vehicle and the vehicle in front of yo
S_A_V [24]
I would say two car length rule. I am not sure what the official license rule is or if it has been changed, but originally the rule was 3 seconds usually depending on how fast the car is going. The faster you are going, the longer it takes to stop. So two-car length rule would probably be the best choice. Definitely not A.
8 0
3 years ago
Read 2 more answers
PLS HELP SOON AS POSSIBLE WILL GIVE BRAINLIEST!!!
Evgesh-ka [11]

The best reason that the title of an article published on a website might not help to determine if the information is reliable is that titles attract readers; they do not guarantee accuracy

  • The title of an article tells the reader what the work or article is all about. It summarizes the whole work into a single text. Website in bid to attract more people to their page most times uses attractive titles or commonly search words but this does not show that the work is accurate.

  • People often make or select a title that grabs attention and one that makes people want to read further

Conclusively we can say that The title of an article published on website is meant to attract readers as they do not guarantee accuracy

Learn more from

brainly.com/question/11427677

5 0
2 years ago
Other questions:
  • Standards for all managers ethical responsibilities are covered in a company's
    7·2 answers
  • If the physical memory size is doubled without changing any of its other parameters, the number of entries in the page table
    5·1 answer
  • Universal Containers has a sales team focused on renewals. They will use many of the same Opportunity fields as other teams, but
    13·1 answer
  • What are static components in a multimedia system?
    15·2 answers
  • It is a SQL keyword that creates an autoincrementing field.
    5·1 answer
  • Describe the importance of human interaction in a computing system.
    14·2 answers
  • Bored can you talk to me
    5·2 answers
  • Truth or dare????????????
    5·1 answer
  • You can merge the cells using the rowspan and colspan attribute of the tag <br> true or false​
    7·1 answer
  • A eclipse occurs at a full moon when the moon passes between earth and the sun
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!