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
almond37 [142]
3 years ago
7

Test if a number grade is an A (greater than or equal to 90). If so, print "Great!". Sample Run Enter a Number: 98 Sample Output

Great! Hint Grades may be decimals
Computers and Technology
1 answer:
Debora [2.8K]3 years ago
7 0

Answer:

Using Python language :

a = eval ( input ( "Enter a mark please"))

if ( a <0){

print ("Invalid mark")};

else if (a >=90 && a <=100){ print

( "GREAT")};

Explanation:

You might be interested in
(1) Prompt the user to input an integer, a double, a character, and a string, storing each into separate variables. Then, output
Alex787 [66]

Answer:

import java.util.*;

public class Main{

public static void main(String[] args) {

    Scanner input = new Scanner(System.in);

 int intgVal; double dblVal; char chrVal; String strVal;

 System.out.print("Enter integer: ");  

 intgVal = input.nextInt();

 System.out.print("Enter double: ");  

 dblVal = input.nextDouble();

 System.out.print("Enter character: ");  

 chrVal = input.next().charAt(0);

 input.nextLine();

 System.out.print("Enter string: ");  

 strVal = input.nextLine();

 System.out.println(intgVal+" "+dblVal+" "+chrVal+" "+strVal);

 System.out.println(strVal+" "+chrVal+" "+dblVal+" "+intgVal);

 int IntValue = (int) dblVal;

 System.out.print("Cast to an integer: "+IntValue);

}

}

Explanation:

See attachment for complete program where comments were used to explain each line of the program

Download txt
6 0
3 years ago
What is impact of Internet<br> in our lives
NeTakaya

Answer:

The Internet has changed business, education, government, healthcare, and even the ways in which we interact with our loved ones—it has become one of the key drivers of social evolution. The changes in social communication are of particular significance.

7 0
3 years ago
How to play Drinkopoly game?
professor190 [17]
Answer:
Never heard of that lol
3 0
2 years ago
Using language c, find the nth Fibonacci, knowing that nth Fibonacci is calculated by the following formula: - If n = 1 Or n = 2
Nina [5.8K]

Answer:

#include <stdio.h>

int fib(int n) {

 if (n <= 0) {

   return 0;

 }

 if (n <= 2) {

   return 1;

 }

 return fib(n-1) + fib(n-2);

}

int main(void) {

 for(int nr=0; nr<=20; nr++)

   printf("Fibonacci %d is %d\n", nr, fib(nr) );

 return 0;

}

Explanation:

The code is a literal translation of the definition using a recursive function.

The recursive function is not per se a very efficient one.

4 0
3 years ago
On a piano, a key has a frequency, say f0. Each higher key (black or white) has a frequency of f0 * rn, where n is the distance
Stels [109]

Answer:

#include <stdio.h>

int main()

{

float your_value1, your_value2, your_value3, your_value4, your_value5;

printf("Enter a frequency: ");

scanf_s("%f", &your_value1);//storing initial key frequency in your value 1

 

float r = 2.0 / 12;//typing 2.0 so it is treated as float and not int

your_value2 = your_value1 * r * 1; //initial*r*n

your_value3 = your_value1 * r * 2; //initial*r*n

your_value4 = your_value1 * r * 3; //initial*r*n

your_value5 = your_value1 * r * 4; //initial*r*n

printf("%0.2f %0.2f %0.2f %0.2f %0.2f", your_value1, your_value2, your_value3, your_value4, your_value5);

return 0;

}

Explanation:

The purpose of this exercise is to make you understand the difference between float and int. float variables are used when you need decimals in your calculations. int is used when you need integers. The problem in this exercise was the formulation of r. Now r is = 2/12, this means that when we type r as that, the computer assumes that it is an integer and treats it as such. So, it will convert the 0.166667 into 0. To overcome this, all you have to do is type 2.0 instead of 2 alone.

The %0.2 command restricts the float variable to 2 decimal places. By default, it has 6 decimal places.

I have used the function scanf_s instead of scanf simply because my compiler does not work with scanf.

3 0
3 years ago
Other questions:
  • Your organization issues devices to employees. These devices generate one-time passwords every 60 seconds. A server hosted withi
    15·1 answer
  • . Business-to-business integration (B2Bi) is vital for efficient and accurate flow of data across internal ISs and external busi
    11·1 answer
  • When discussing the data-modeling building blocks, anything (a person, a place, a thing, or an event) about which data are to be
    15·1 answer
  • When planning a backup strategy, ideally one needs to prioritize important data and only back up what is absolutely necessary fo
    15·1 answer
  • Dave has to create animations for a game. Which tool can Dave use?
    6·1 answer
  • Why bootable installer preparation is important? explain
    9·1 answer
  • MULTIPLE COICE! BRAINLIEST
    12·1 answer
  • Which is the best choice to explain why a human resource manager is so
    5·1 answer
  • Explain how the internet works​
    7·2 answers
  • Create an java application that will process 3-digit numbers as follows:
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!