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
maks197457 [2]
2 years ago
13

The Power of If Worksheet

Computers and Technology
2 answers:
Crazy boy [7]2 years ago
6 0
Def main





Name = input
sattari [20]2 years ago
3 0

Answer:

def main():

  name = input("Enter your name: ")

  age = input("Enter your age: ")

  color = input("Enter you favorite color: ")

  birth = input("Enter your birthday: ")

  print(name + " is "+age+" year(s) old.")

  print(name + "'s favorite color is "+color)

  print(name + " was born on "+ birth)

main()

I hope this helps! The code runs perfectly fine for me.

Explanations:

You might be interested in
Which of the following technique is well suited to support very large address space, e.g. 64-bit address space? Select one: a. C
algol13

Answer:

Inverted page tables

Explanation:

Inverted page tables are indeed the ones used during broad address space, including such 64-bit addresses.

8 0
3 years ago
Calculate the weighted grade for each student that appears in the data file. You may calculate the grade based on total earned p
lutik1710 [3]

Answer:

I don't know the answer, sorry

6 0
3 years ago
Which Boolean operator produces the result 1 only if both values are 1? Which Boolean operator produces the result 0 only if bot
lorasvet [3.4K]

Blank 1 is AND

Blank 2 is OR

5 0
3 years ago
7.4.4: Length of User's Name
Natalija [7]

Answer:

user_name = input("input user name: ")
print(len(user_name))

Explanation:

input - input function in python

len - length of value

print - print data

6 0
2 years ago
7. Test Average and Grade Write a program that asks the user to enter five test scores. The program should display a letter grad
Alenkasestr [34]

Answer:

The code solution is written in Java.

  1. import java.util.Scanner;
  2. public class TestScore {
  3.    public static void main(String[] args) {
  4.        Scanner input = new Scanner(System.in);
  5.        System.out.print("Please enter first score: ");
  6.        double firstScore = input.nextDouble();
  7.        System.out.println("Grade: " + determineGrade(firstScore));
  8.        System.out.print("Please enter second score: ");
  9.        double secondScore = input.nextDouble();
  10.        System.out.println("Grade: " + determineGrade(secondScore));
  11.        System.out.print("Please enter third score: ");
  12.        double thirdScore = input.nextDouble();
  13.        System.out.println("Grade: " + determineGrade(thirdScore));
  14.        System.out.print("Please enter fourth score: ");
  15.        double fourthScore = input.nextDouble();
  16.        System.out.println("Grade: " + determineGrade(fourthScore));
  17.        System.out.print("Please enter fifth score: ");
  18.        double fifthScore = input.nextDouble();
  19.        System.out.println("Grade: " + determineGrade(fifthScore));
  20.        System.out.println("Average score: " + calcAverage(firstScore, secondScore, thirdScore, fourthScore, fifthScore));
  21.    }
  22.    public static double calcAverage(double score1, double score2, double score3, double score4, double score5){
  23.        double average = (score1 + score2 + score3 + score4 + score5) / 5;
  24.        return average;
  25.    }
  26.    public static String determineGrade(double score){
  27.        if(score >= 90){
  28.            return "A";
  29.        }
  30.        else if(score >= 80 ){
  31.            return "B";
  32.        }
  33.        else if(score >=70){
  34.            return "C";
  35.        }
  36.        else if(score >=60){
  37.            return "D";
  38.        }
  39.        else{
  40.            return "F";
  41.        }
  42.    }
  43. }

Explanation:

Firstly, create the method, <em>calcAverage()</em>, that takes five test scores. Within the method, calculate the average and return it as output. (Line 33 - 36)

Next, create another method, <em>determineGrade()</em>, which takes only one score and return the grade based on the range of the  score. (Line 38 -54)

Once the two required methods are created, we are ready to prompt use for input five test scores using Java Scanner class. To use get user input, create a Scanner object (Line 7). Next, use getDouble() method to get an input score and assign it to variables firstScore, secondScore, thirdScore, fourthScore & fifthScore, respectively. Once a score input by user, call determineGrade() method by passing the input score as argument and immediately print out the return grade. (Line  9 - 27)

At last, call calcAverage() method by passing the first test score variables as argument and print out the returned average value. (Line 29).

5 0
3 years ago
Other questions:
  • A name given to a spot in memory is called:
    5·1 answer
  • Open a command prompt on PC1. Issue the command to display the IPv6 settings. Based on the output, would you expect PC1 to be ab
    7·1 answer
  • What are three new things in Microsoft Word 2016?
    5·1 answer
  • To save and store data separate from a computer, it helps to have an
    15·2 answers
  • In one to two sentences, explain why citizens pay taxes
    8·1 answer
  • Which code will allow Joe to print Coding is fun. on the screen? print("Coding is fun.") print(Coding is fun.) print = (Coding i
    10·2 answers
  • Select the correct answer.
    15·2 answers
  • The table button is present in the ……… tab.​
    14·2 answers
  • Write a program that displays the middle value of three unduplicated input values. Hint: Review the four solutions in the smalle
    10·1 answer
  • PLSS HELP ASAP ILL GIVE BRAINLIES THANKS
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!