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
____ [38]
3 years ago
7

Write a program that asks the p34won to enter their grade, and then prints GRADE is a fun grade. Your program should repeat thes

e steps until the user inputs I graduated
Computers and Technology
1 answer:
andrew-mc [135]3 years ago
8 0

Answer:

Following are the code to this question:

def fun():#defining a method fun

  while True:#defining a while loop  

      g = input("Enter your grade: (I graduated) ")#defining variable g for input value

      if g == "I graduated":#defining if block to check string value

          return 0#return  

      print("{} is a fun grade".format(g))#use print method to print string value  

fun()#calling the method

Output:

Enter your grade: (I graduated) 1st

1st is a fun grade

Enter your grade: (I graduated) 2nd

2nd is a fun grade

Enter your grade: (I graduated) I graduated

Explanation:

In the given python code, a method "fun" is defined, and inside the method, a while loop is defined, which uses a variable "g" for input value from the user-end.

In the next step, if block is defined to check string a value and return a value 0, and use the print method to print the given value, and call the above method fun.  

You might be interested in
Technician A says that the engine block is the solid frame from which all automotive and truck engines are constructed and is ma
SashulF [63]
B I SAY BOTH TECHNICIANS !! =)
3 0
3 years ago
Read 2 more answers
WHICH COMPUTER COMPONENT CONTAINS ALL THE CIRCUITRY NECESSARY FOR THE OTHER COMPONENTS OR DEVICES TO COMMUNICATE WITH ONE ANOTHE
netineya [11]
I'm pretty sure it's the motherboard. You shouldn't use all caps. It makes it seem like you are shouting, and less people want to answer. :)
7 0
3 years ago
When spraying pesticide wear and protective eyeglass​
exis [7]
Ummmmmmmmmmmmmmmmmmmmm ok
6 0
3 years ago
Read 2 more answers
Select the correct answer. Which of these is a function of the marketing team of a game development studio? A. creating art elem
Alexus [3.1K]

Answer:

C. testing

Explanation:

4 0
3 years ago
Read 2 more answers
2-Write test programs in java to determine the scope of a variable declared in a for statement. Specifically, the code must dete
ankoles [38]

Answer:

See Explaination

Explanation:

public class testscope

{

//start of main function

public static void main(String[] args)

{

//varible declration

int i;

int x;

//loop for 10 times

for(i=0; i<10; i++)

{

//initialize value of x to 10

x = 10;

}

//the scope of variable x is visible outside of for loop

System.out.println("The value of x is: "+x);

}

}

See attachment for sample output

nb:

You can clearly see in the output of Java program the value of x is not printed and program return errors. It means the variable x declared inside for loop does not has scope outside the for loop.

7 0
3 years ago
Other questions:
  • Assume that processor refers to an object that provides a void method named process that takes no arguments. As it happens, the
    5·1 answer
  • Ports on the motherboard can be disabled or enabled in ____ setup. RAM Firmware Northbridge BIOS
    8·1 answer
  • Optimally, the __________ guides investment decisions and decisions on how ISs will be developed, acquired, and/or implemented.
    6·1 answer
  • Rate is how fast a screen updates the information being displayed.
    6·2 answers
  • Does a BIOS reset erase data such as pictures, programs or other things like that?
    13·1 answer
  • Using this tool to help you to visualize your slides and develop your content
    13·1 answer
  • economists measure the personal satisfaction someone gets from consuming goods and services with the concept of.....?
    6·1 answer
  • Select the correct answer.
    12·1 answer
  • If you want to transfer information transform STM to LTM, it is essential that you make the information ______________________.
    9·1 answer
  • Imagine an everyday scenario in which you are using the internet: downloading a file, uploading a photo, checking your email, et
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!