Assume we have two lists, list A and list B. List A contains the numbers [20,10,20], while list B contains the numbers [40,10,30,20,40,30]. We choose one number from list A randomly and one number from list B randomly. What is the chance that the number we drew from list A is larger than or equal to the number we drew from list B

Answers

Answer 1

Answer:

5/ 18

Explanation:

Given :

List A: [20,10,20]

List B: [40,10,30,20,40,30]

Chance that number drawn from list A is larger than or equal to that drawn dlfrom list B.

If:

A = 20

B ≤ 20 : [10,20] = 2

A = 10

B ≤ 10 : [10] = 1

A = 20

B ≤ 20 : [10,20] = 2

Probability = Required outcome / Total possible outcomes

Hence,

required outcome = (2 + 2 +1) = 5

Total possible outcomes = 3C1 * 6C1 = (3 * 6) = 18

Hence,

chance that the number we drew from list A is larger than or equal to the number we drew from list B

= 5 / 18

Answer 2

In this exercise we have to use the knowledge in computational language in python to describe a code that best suits, so we have:

The code can be found in the attached image.

To make it simpler we can write this code as:

import random

A=[20,10,20]

B=[40,10,30,20,40,30]

print(random.choice(A))

print(random.choice(B))

See more about python at brainly.com/question/19705654

Assume We Have Two Lists, List A And List B. List A Contains The Numbers [20,10,20], While List B Contains

Related Questions

write a BASIC program to find the product of any two numbers​

Answers

Answer:

Print 4 + 4

Explanation:

If you're writing this in the programming language called BASIC, this is how you would add any two numbers.

An expression that returns a value is known as a​

Answers

Answer:

In computer programming, a return statement causes execution to leave the current subroutine and resume at the point in the code immediately after the instruction which called the subroutine, known as its return address. The return address is saved by the calling routine, today usually on the process's call stack or in a register. Return statements in many languages allow a function to specify a return value to be passed back to the code that called the function.

An expression that returns a value is known as a​ function. Check more about function  below.

What is a function?

A function is often seen as a kind of expression or rule, or law that often tells more about a relationship.

Conclusively, a function is known to often returns a value back to the instruction that is known also to be the function. This is regarded as the differences that exist between a method and a function.

Learn more about function  from

https://brainly.com/question/20476366

what is the correct process for setting up a recurring project for the same client in qbo accountant?

Answers

Answer:

The answer is below

Explanation:

The correct process for setting up a recurring project for the same client in Quickbooks Online Accountant is as follows:

1. Go to Work, then select create a project

2. Select the Repeat button, then set the frequency and duration

3. Formulate the project and save it.

4. Reopen the project

5. And select the Duplicate button for the proportion of times you want it to recur. This includes assigning the interval, day of the recurrence, and end time.

6. Then select Save.

Firstly, invent a separate project, then pick the repeat button on the right of the screen, specify the frequency and duration. Its frequency can indeed be weekly, biweekly, monthly, and so on.

This project's duration must be determined. This step saves the user time when working on a project. Otherwise, the same actions would have to be done again and over, which would be time-consuming and repetitive.New project and click the continue option to start the process of preparing a recurring project for the same client.This second alternative is not the best method to create a recurring project for the same client. Based on the phase, the initiatives can be generated as many times as necessary.

Therefore, the answer is "first choice".

Learn more:

brainly.com/question/24356450

Which of the followings is/are true about RISC (Reduced instruction set computing)?

a. RISC (Reduced instruction set computing) architecture has a set of instructions, so high-level language compilers can produce more efficient code
b. It allows freedom of using the space on microprocessors because of its simplicity.
c. Many RISC processors use the registers for passing arguments and holding the local variables.
d. RISC functions use only a few parameters, and the RISC processors cannot use the call instructions, and therefore, use a fixed length instruction which is easy to pipeline.
e. All of the above.

Answers

Answer:

e. All of the above.

Explanation:

An instruction set architecture (ISA) can be defined as series of native memory architecture, instructions, addressing modes, external input and output devices, virtual memory, and interrupts that are meant to be executed by the directly.

Basically, this set of native data type specifies a well-defined interface for the development of the hardware and the software platform to run it.

The two (2) main types of architectural design for the central processing unit (CPU) are;

I. Complex instruction set computing (CISC): it allows multi-step operation or addressing modes to be executed within an instruction set. Thus, many low-level operations are being performed by an instruction.

II. Reduced instruction set computing (RISC): it allows fixed length instructions and simple addressing modes that can be executed within a clock cycle.

All of the following statements are true about RISC (Reduced instruction set computing) because they are its advantages over complex instruction set computing (CISC);

a. RISC (Reduced instruction set computing) architecture has a set of instructions, so high-level language compilers can produce more efficient code.

b. It allows freedom of using the space on microprocessors because of its simplicity.

c. Many RISC processors use the registers for passing arguments and holding the local variables.

d. RISC functions use only a few parameters, and the RISC processors cannot use the call instructions, and therefore, use a fixed length instruction which is easy to pipeline.

The options that are true about RISC (Reduced instruction set computing) is; E: all of the above

We are dealing with instruction set computing which is a sequence of instructions, addressing modes, external input & output devices, virtual memory, and other interruptions that are designed to be executed by the user directly.

Now, in architectural design meant for the central processing unit (CPU) the benefit of a Reduced instruction set computing (RISC) is that it is a type that allows for a fixed length of instructions with simple addressing styles that can be executed within a clock cycle.

Looking at all the given options, we can say they are all true about RISC (Reduced instruction set computing) as they possess advantages over the other type of instruction set computing called complex instruction set computing (CISC).

Read more about instruction set computing at; https://brainly.com/question/17493537

In ……………cell reference, the reference of a cell does not change. ​

Answers

Answer:

In absolute cell reference, the reference of a cell does not change. 

Complete the function favoriteFlower(). Note that the program will not run as is because the function is incomplete. The purpose of the function is to determine if the given flower is in the top three of my favorite flowers. The starter file defines a list of favorite flowers that is ordered most favorite to least favorite. Please pass the flower name and the flower list as arguments in the function. The expected output is:

Answers

Answer:

What Language? Once you respond with a comment, I will be happy to write the code for you. I write code 24/7 (Because I have nothing better to do), so I will wait for you to comment. Also is there any pre-existing code?

Explanation:

In order to restrict editing to a document, a user will go to Review, , Restrict Editing, and will then select what kinds of editing are allowed.

Answers

Answer: drafting

Explanation:

Do any of these algorithms (Random Allocation, Round-Robin, Weighted Round-Robin, Round-Robin DNS Load Balancing, and Least Connections) compromise security?

Answers

Answer:

yes and

Explanation:

why do you need to know about a buildings security are you going to rob it ???

Which story element refers to the way the story unfolds?
A.
premise
B.
back story
C.
synopsis
D.
plot

Answers

Answer:

D. Plot

Explanation:

The plot is how the story develops, unfolds and move through time.

What information is required for a complete citation of a website source?
the title, volume number, and page numbers
the responsible person or organization and the website URL
the responsible person or organization, date accessed, and URL
the responsible person or organization and the date accessed

Answers

Answer:

I believe that the answer is C.

Explanation:

Answer:

think the answer is:

the responsible person or organization, date accessed, and URL

Explanation:

have a nice day

2. What is the implication of media killings in the Philippines?​

Answers

Answer:

Throughout the clarification below, the description of the query is mentioned.

Explanation:

In the Philippines, the Implication of media indicates that perhaps the Philippines isn't a safe environment for reporters, and therefore more remains to be improved to change this pattern.But it didn't start underneath Duterte before you could even say that, as well as he didn't order strikes. If he had instructions in which he would criticize, for perhaps a long period presently Ressa had died as one of his other very resolute and influential media commentators.

is technology oversold

Answers

Answer:

no

Explanation:

Answer:

no

Explanation:

if u can still pay for using phones, computers, etc. then we will still have technology

Look at the following assignment statements:

word1 = "rain"
word2 = "bow"

What is the correct way to concatenate the strings?

1 newWord = word1 == word2

2 newWord = word1 + word2

3 newWord = word1 * word2

4 newWord = word1 - word2

Answers

Answer: number 2 is the correct way to do it

Explanation:

Answer:

2 newWord = word1 + word2

Explanation:

Which are technical and visual demands
that need to be considered when
planning a project?

Answers

Answer: Resolution or DPI, deliverables, and file types are important technical and visual demands to consider when planning a project.

Explanation: Keep in mind whether or not the project will be published in print or on the Web.

Arrange the computers in the order fastest to slowest: Minicomputer, Supercomputer, Personal Computer and Mainframe.

Answers

Answer:

supercomputer, mainframe, personal computer, minicomputer

Explanation:

Interstate highway numbers Primary U.S. interstate highways are numbered 1-99. Odd numbers (like the 5 of 95) go north/south, and evens (like the 10 or 90) go east/west. Auxiliary highways are numbered 100-999, and service the primary highway indicated by the rightmost two digits. Thus, I-405 services 1-5, and I-290 services -90. Given a highway number, indicate whether it is a primary or auxiliary highway. If auxiliary, indicate what primary highway it serves. Also indicate if the (primary) highway runs north/south or east/west. Ex: If the input is 90 the output is I-90 is primary, going east/west. Ex: If the input is 290 the output is I-290 is auxiliary, serving 1-90, going cast/west. Ex: If the input is: 0 the output is O is not a valid interstate highway number. See Wikipedia for more info on highway numbering. main.py Load default templ else 1 nighway_number - int(input) 2 Type your code here. " 4 if highway_number - 0: 5 print(highway_number, 'is not a valid interstate highway number.') 6 if highway_number in range(1, 99-1): 7 if highway..number % 2 - : 8 print('I-' highway number, "is primary, going east/west.") 9 print("I-' highway_number, "is primary, going north/south." 11 else: 12 served - highway_number % 100 13 if highway number - 1000: print highway_number, 'is not a valid Interstate highway number.') 15 if highway number in range(99, 999.1): 16 if highway_number 2 - 0 print('I..highway_number, 'is auxiliary, serving I.', 'x.f.' Xserved, 'going eastwest.) 18 else: print('1', highway_number, 'is auxiliary, rving I-','%.f.' Xserved, 'going north/south.) 10 14 17 19 Develop mode Submit mode When done developing your program press the Submit for grading button below. This will submit your program for auto-grading. Submit for grading Sature of your work Input 90 Your output I- 90 is primary, going east/west. Expected output I-90 is primary, going east/west. 0 2: Auxiliary (290) Output is nearly correct; but whitespace differs. See highlights below. Special character legend Input 290 Your output 1- 290 is auxiliary, serving I- 90, going east/west. I-290 is auxiliary, serving 1-90, going east/west. Expected output 3 Invalid (0) 1/1 Input 0 Your output is not a valid interstate highway number. 4. Compare output 0/2 Output is nearly correct; but whitespace differs. See highlights below Special character legend Input Your output

Answers

Answer:

See attachment for complete solution

Explanation:

The program in your question is unreadable.

So, I started from scratch (see attachment for complete solution)

Using the attached file as a point of reference.

The program has 15 lines

Line 1: Prompt the user for highway number (as an integer)

Line 2: Convert the user input to string

Line 3: Check if highway number is outside 1-999

Line 4: If line 3 is true, print a notice that the input is outside range

Line 5: If line 3 is not true

Line 6: Check if the number of highway digits is 2.

Line 7: If true, Check if highway number is an even number

Line 8: If even, print that the highway is primary and heads east/west

Line 9: If highway number is odd number

Line 10: Print that the highway is primary and heads north/south

Line 11: If the number of highway digits is 3

Line 12: Check if highway number is an even number

Line 13: If even, print that the highway is auxiliary and heads east/west

Line 14: If highway number is odd number

Line 15: Print that the highway is auxiliary and heads north/south

See attachment for complete program

In this assignment we are going to practice reading from a file and writing the results of your program into a file. We are going to write a program to help Professor X automate the grade calculation for a course. Professor X has a data file that contains one line for each student in the course. The students name is the first thing on each line, followed by some tests scores. The number of scores might be different for each student. Here is an example of what a typical data file may look like: Joe 10 15 20 30 40 Bill 23 16 19 22 Sue 8 22 17 14 32 17 24 21 2 9 11 17 Grace 12 28 21 45 26 10 John 14 32 25 16 89 Program details Write a program that: Ask the user to enter the name of the data file. Read the data from the file and for each student calculate the total of the test scores, how many tests the student took, and the average of the test scores. Save the results in an output file (e.g. stats.txt) in the following order: studentName totalScore numberOfTests testAverage Note that the average is saved with 2 decimal places after the decimal point. Validation: Make sure your program does not crash if a file is not found or cannot be open.

Answers

Answer:

In Python:

import os.path

from os import path

fname = input("Filename: ")

if path.exists(fname):

with open(fname) as file_in:

 lines = []

 for line in file_in:

  lines.append(line.rstrip('\n'))

f = open("stat.txt","r+")

f.truncate(0)

f = open("stat.txt", "a")

f.write("Names\tTotal\tSubjects\tAverage\n")

for i in range(len(lines)):

 rowsum = 0; count = 0

 nm = lines[i].split()

 for j in nm:

  if (j.isdecimal()):

   count+=1

   rowsum+=int(j)

 average = rowsum/count

 f.write(nm[0]+"\t %3d\t %2d\t\t %.2f\n" % (rowsum, count, average))

f.close()

else:

print("File does not exist")

Explanation:

See attachment for explanation where comments were used to explain each line

For each student, the sum of the marks, total tests were taken and the average of marks is calculated and is stored in an output file, for example, stats.txt.

Python Code:

The code in Python asks the user for an input file name. If the input file is not found an error is printed else the data in the file is processed further.

Try:

  # take input file name

  file = input('Enter name of the data file: ')

# open the input file

  ip = open(file, 'r')

# store the lines from input file in a list

  lines = ip.readlines()

  # close the file

  ip.close()

# open the output file

  op = open('stats.txt', 'w')

# iterate over each line

  for line in lines:

 # split data using space as delimiter

      data = line.split()

 # get name

   name = data[0]

 # get marks and convert them to integer

      marks = list(map(int, data[1:]))

# get sum of marks

      total = sum(marks)

# get number of tests

      length = len(marks)

# calculate average of marks

      avg = total/length

# add the data to output file

      op.write('{} {} {} {:.2f}\n'.format(name, total, length, avg))

# close the output file

  op.close()

print('Stats have been save in the output file')

# catch FileNotFoundError

except FileNotFoundError:

# print error

  print('Error: that file does not exist. Try again.')

Learn more about the topic python code:

https://brainly.com/question/14492046

what is the portrait mode

Answers

Answer:

Explanation:

When your elecronic devices screen is positioned upright or the way a photo is taken

If you want an example look up portrait mode on go0gle or safar1

We can easily improve the formula by approximating the area under the function f(x) by two equally-spaced trapezoids. Derive a formula for this approximation and implement it in a function trapezint2( f,a,b ).

Answers

Answer:

Explanation:

[tex]\text{This is a math function that is integrated using a trapezoidal rule } \\ \\[/tex]

[tex]\text{import math}[/tex]

def [tex]\text{trapezint2(f,a,b):}[/tex]

      [tex]\text{midPoint=(a+b)/2}[/tex]

       [tex]\text{return .5*((midPoint-a)*(f(a)+f(midPoint))+(b-midPoint)*(f(b)+f(midPoint)))}[/tex]

[tex]\text{trapezint2(math.sin,0,.5*math.pi)}[/tex]

[tex]0.9480594489685199[/tex]

[tex]trapezint2(abs,-1,1)[/tex]

[tex]1.0[/tex]

In this exercise we have to use the knowledge of computational language in python to write the code.

the code can be found in the attachment.

In this way we have that the code in python can be written as:

   h = (b-a)/float(n)

   s = 0.5*(f(a) + f(b))

   for i in range(1,n,1):

       s = s + f(a + i*h)

   return h*s

from math import exp  # or from math import *

def g(t):

   return exp(-t**4)

a = -2;  b = 2

n = 1000

result = Trapezoidal(g, a, b, n)

print result

See more about python at brainly.com/question/26104476

For this program you will build a simple dice game called Pig. In this version of Pig, two players alternate turns. Players each begin the game with a score of 0. During a turn a player will roll a six-sided die one or more times, summing up the resulting rolls. At the end of the player's turn the sum for that turn is added to the player's total game score If at any time a player rolls a 1, the player's turn immediately ends and he/she earns O points for that turn (i.e. nothing is added to the player's total game score). This is called "pig". After every roll that isn't a 1, the player may choose to either end the turn, adding the sum from the current turn to his/her total game score, or roll again in an attempt to increase the sum. The first player to 50 points wins the game
Details
Open a text editor and create a new file called pig.py. In the file
Write a function called print_scores that has four parameters - these hold, in this order, the name of the first player (a string), his/her score (an int), the second player's name (a string), and score (an int).
The function will
Print the following message, using the current parameter values for the player names and scores (NOT necessarily Ziggy, 18, Elmer, and 23) -SCORES Ziggy:18 Elmer 23--
Print an empty line before this line
There is a single tab between SCORES and the name of player 1 .
There is a single tab between player 1's score and player 2's name .
Every other gap is a single space

Answers

Answer:

In Python:

import random

p1name = input("Player 1: "); p2name = input("Player 2: ")

p1score = 0; p2score = 0

playerTurn = 1

print(p1name+" starts the game")

roll = True

while(roll):

   if playerTurn == 1:

       p1 = random.randint(1,6)

       print(p1name+"'s roll: "+str(p1))

       if p1 == 1:

           playerTurn = 2

           roll = True

       else:

           p1score+=p1

           another = input("Another Roll (y/n): ")

           if another == "y" or another == "Y":

               roll = True

           else:

               playerTurn = 2

               roll = True

   else:

       p2 = random.randint(1,6)

       print(p2name+"'s roll: "+str(p2))

       if p2 == 1:

           playerTurn = 1

           roll = True

       else:

           p2score+=p2

           another = input("Another Roll (y/n): ")

           if another == "y" or another == "Y":

               roll = True

           else:

               playerTurn = 1

               roll = True

   if p1score >= 50 or p2score >= 50:

       roll = False

print(p1name+":\t"+str(p1score)+"\t"+p2name+":\t"+str(p2score))

Explanation:

Note that the dice rolling is simulated using random number whose interval is between 1 and 6

This imports the random module

import random

This line gets the name of both players

p1name = input("Player 1: "); p2name = input("Player 2: ")

This line initializes the scores of both players to 0

p1score = 0; p2score = 0

This sets the first play to player 1

playerTurn = 1

This prints the name of player 1 to begin the game

print(p1name+" starts the game")

This boolean variable roll is set to True.

roll = True

Until roll is updated to False, the following while loop will be repeated

while(roll):

If player turn is 1

   if playerTurn == 1:

This rolls the dice

       p1 = random.randint(1,6)

This prints the outcome of the roll

       print(p1name+"'s roll: "+str(p1))

If the outcome is 1, the turn is passed to player 2

       if p1 == 1:

           playerTurn = 2

           roll = True

If otherwise

       else:

Player 1 score is updated

           p1score+=p1

This asks if player 1 will take another turn

           another = input("Another Roll (y/n): ")

If yes, the player takes a turn. The turn is passed to player 2, if otherwise

           if another == "y" or another == "Y":

               roll = True

           else:

               playerTurn = 2

               roll = True

If player turn is 2

   else:

This rolls the dice

       p2 = random.randint(1,6)

This prints the outcome of the roll

       print(p2name+"'s roll: "+str(p2))

If the outcome is 1, the turn is passed to player 1

       if p2 == 1:

           playerTurn = 1

           roll = True

If otherwise

       else:

Player 2 score is updated

           p2score+=p2

This asks if player 2 will take another turn

           another = input("Another Roll (y/n): ")

If yes, the player takes a turn. The turn is passed to player 1, if otherwise

           if another == "y" or another == "Y":

               roll = True

           else:

               playerTurn = 1

               roll = True

If either of both players has scored 50 or above

   if p1score >= 50 or p2score >= 50:

roll is updated to False i.e. the loop ends

       roll = False

This prints the name and scores of each player

print(p1name+":\t"+str(p1score)+"\t"+p2name+":\t"+str(p2score))

A low price point is an example of a ________. Choose one.

Answers

Answer:

of a bad product

Explanation:

COMPUTER STUDIES
31.
Which of the following information
ages lasted between the end of
Bronze age and the spread of Roman
Empire?
A.
B.
C.
D.
E.
Electronic
Industrial
Iron
Mechanical
Stone

Answers

Answer:

iron

Explanation:

In cell 14, calculate


the profit by


subtracting the


donation from the


streaming revenues.

Answers

Answer:

See Explanation

Explanation:

The question is incomplete as the cells that contains donation and streaming revenues are not given

So, I will make the following assumption:

H4 = Donations

G4 =  Streaming Revenues

So, the profit will be:

Enter the following formula in cell I4

=(G4 - H4)

To get the actual solution in your case, replace G4 and H4 with the proper cell names

does anybody know how to do 6.3 code practice on edhesive. NEED ASAP!!!​

Answers

Answer:

Hopes this helps if not comment and I'll change it

Explanation:

import simplegui

import random

def draw_handler(canvas):

for i in range (0, 1000):

x = random.randint(1, 600)

y = random.randint(1, 600)

r = random.randint(0, 255)

g = random.randint(0, 255)

b = random.randint(0, 255)

color = "RGB( " + str(r) + "," + str(g) + "," + str(b) + ")"

canvas.draw_point((x, y), color)

frame = simplegui.create_frame('Points', 600, 600)

frame.set_canvas_background("Black")

frame.set_draw_handler(draw_handler)

frame.start()

Write a program that asks the user to guess the next roll of a six-sided die. Each guess costs $ 1. If they guess correctly, they get $ 100.00. The player will start out with a $10.00 bank. Each time he (or she) guesses incorrectly you will subtract $1.00 from their bank. Each time they guess correctly, you add $10.00 to their bank. Print the total winnings or losses at the end of the game. You can simulate the toss of the dice using the RandomRange function (Don't forget to Randomize).

Answers

Answer in python:

import random

money = 10

winnings = 0

def main():

global winnings

global money

dice_num = random.randrange(1,6)

input_str = "Guess the dice number. You have $"+str(money)+" > "

input_num = input(input_str)

if int(input_num) == dice_num:

 money = money + 10

 winnings = winnings + 10

else:

 money = money - 1

if money < 0:

 print("You lose. You won "+str(winnings)+" times. Press enter to try again")

 useless_variable = input()

 main()

else:

 main()  

main()

Explanation:

______________ is a raw fact about a person or an object
Question 1 options:


File


Lookup wizard


Information


Data

Answers

I think its C information. Sowwy if I’m wrong


2. Which of the following is a shortcut key to Exit from any operation?
a) Ctrl+R
b) Ctrl+Q
c) Ciri-Y

Answers

Answer:

Its b) Ctrl+Q. Hope it helps.

Explanation:

Answer:

ctrl r

Explanation:

ctrl r is redo

ROCK-PAPER-SCISSORS Write a program that plays the popular game of rock-paper-scissors. (A rock breaks scissors, paper covers rock, and scissors cut paper). The program has two players and prompts the users to enter rock, paper or scissors. Your program does not have to produce any color. The color is there just to show you what your program should be inputting and outputting. The writing in blue represents output and writing in red represents input. Here are some sample runs:

Answers

Answer:

In Python

print("Instruction: 1. Rock, 2. Paper or 3. Scissors: ")

p1 = int(input("Player 1: "))

p2 = int(input("Player 2: "))

if p1 == p2:

   print("Tie")

else:

   if p1 == 1: # Rock

       if p2 == 2: #Paper

           print("P2 wins! Paper covers Rock")

       else: #Scissors

           print("P1 wins! Rock smashes Scissors")

   elif p1 == 2: #Paper

       if p2 == 1: #Rock

           print("P1 wins! Paper covers Rock")

       else: #Scissors

           print("P2 wins! Scissors cuts Paper")

   elif p1 == 3: #Scissors

       if p2 == 1: #Rock

           print("P2 wins! Rock smashes Scissors")

       else: #Paper

           print("P1 wins! Scissors cuts Paper")

Explanation:

This prints the game instruction

print("Instruction: 1. Rock, 2. Paper or 3. Scissors: ")

The next two lines get input from the user

p1 = int(input("Player 1: "))

p2 = int(input("Player 2: "))

If both input are the same, then there is a tie

if p1 == p2:

   print("Tie")

If otherwise

else:

The following is executed if P1 selects rock

   if p1 == 1: # Rock

If P2 selects paper, then P2 wins

       if p2 == 2: #Paper

           print("P2 wins! Paper covers Rock")

If P2 selects scissors, then P1 wins

       else: #Scissors

           print("P1 wins! Rock smashes Scissors")

The following is executed if P1 selects paper

   elif p1 == 2: #Paper

If P2 selects rock, then P1 wins

       if p2 == 1: #Rock

           print("P1 wins! Paper covers Rock")

If P2 selects scissors, then P2 wins

       else: #Scissors

           print("P2 wins! Scissors cuts Paper")

The following is executed if P1 selects scissors

   elif p1 == 3: #Scissors

If P2 selects rock, then P2 wins

       if p2 == 1: #Rock

           print("P2 wins! Rock smashes Scissors")

If P2 selects paper, then P1 wins

       else: #Paper

           print("P1 wins! Scissors cuts Paper")

Write a C++ program to calculate the course score of CSC 126. 1. A student can enter scores of 3 quizzes, 2 exams, and a final exam. The professor usually keeps 1 digit after the point in each score but the overall course score has no decimal places. 2. The lowest quiz score will not be calculated in the quiz average. 3. The weight of each score is: quiz 20%, exams 30%, and the final 50%. 4. The program will return the weighted average score and a letter grade to the student. 5. A: 91 - 100, B: 81 - 90, C: 70 - 80, F: < 70.

Answers

Answer:

In C++:

#include <iostream>

using namespace std;

int main(){

   double quiz1, quiz2, quiz3, exam1, exam2, finalexam,quiz;

   cout<<"Quiz 1: "; cin>>quiz1;

   cout<<"Quiz 2: "; cin>>quiz2;

   cout<<"Quiz 3: "; cin>>quiz3;

   cout<<"Exam 1: "; cin>>exam1;

   cout<<"Exam 2: "; cin>>exam2;

   cout<<"Final Exam: "; cin>>finalexam;

   if(quiz1<=quiz2 && quiz1 <= quiz3){        quiz=(quiz2+quiz3)/2;    }

   else if(quiz2<=quiz1 && quiz2 <= quiz3){        quiz=(quiz1+quiz3)/2;    }

   else{         quiz=(quiz1+quiz2)/2;     }

   int weight = 0.20 * quiz + 0.30 * ((exam1 + exam2)/2) + 0.50 * finalexam;

   cout<<"Average Weight: "<<weight<<endl;

   if(weight>=91 && weight<=100){        cout<<"Letter Grade: A";    }

   else if(weight>=81 && weight<=90){        cout<<"Letter Grade: B";    }

   else if(weight>=70 && weight<=80){        cout<<"Letter Grade: C";    }

   else{        cout<<"Letter Grade: F";    }

   return 0;

}

Explanation:

See attachment for complete program where comments were used to explain difficult lines

why must a satellite have distinct uplink and downlink frequencies.​

Answers

Answer:

The reason that a satellite must have a distinct uplink and downlink set of frequencies is because they help avoid any type of interference that may occur. The uplink receives the signal and amplifies it so that it can be transmitted to another frequency (downlink).

Other Questions
can u tell me this girl name please if u can't see it just press the picture Sharon contributed property to the newly formed QRST Partnership. The property had a $100,000 adjusted basis to Sharon and a $160,000 fair market value on the contribution date. The property was also encumbered by a $90,000 nonrecourse debt, which was transferred to the partnership on that date. Sharon is treated as a general partner. She is allocated 30% of QRST's profits and 20% of QRST's losses. Sharon's basis in the partnership interest after the formation transaction is: Bethany has $3.10 in nickels and dimes. She has a total of 44 coins. What is the value of the nickels Bethany has?$0.90$1.30$1.80$2.60 The BEST use of the food pyramid would be __________. Fixed Object Involved in Collision Number of Collisions Pole/post 1,416 Culvert/curb/ditch 2,516 Shrubbery/tree 2,585 Guardrail 896 Embankment 947 Bridge 231 Other/unknown 1,835 Assume that a collision will be randomly chosen from this population. Round your answers to four decimal places. a. What is the probability of a fatal collision with a pole or post HELP FAST PLZZHaving a growth mindset has been shown to:Lead to greater successHave no effect on successLead to greater failure A fraction of the figure below is shaded.3rd grade What is the y-intercept of the line? Ben, you can get _____ a drink at any time. Porcupines can cause damage to wood structures by chewing them. Researchers studied a liquid repellentdesigned to reduce such damage. A sample of 20 wooden blocks of the same size were treated with therepellent and left outside in an area where porcupines are known to live. After a certain amount of time, theblocks were inspected for the number of porcupine teeth marks visible. The data were used to create the95 percent confidence interval (4.9,5.8).Which of the following claims is supported by the interval?AThe expected number of porcupine teeth marks on a wooden block treated with therepellent is less than 5.BBThe expected number of porcupine teeth marks on a wooden block treated with therepellent is 5.The mean number of porcupine teeth marks on all wooden blocks treated with therepellent is 6.DThe mean number of porcupine teeth marks on all wooden blocks treated with therepellent is greater than 6.EThe mean number of porcupine teeth marks on all wooden blocks treated with therepellent is less than 6. What did the American Southwest have that attracted people from Mexico tothe area?A. A population that welcomed immigrantsB. Freedom from religious oppressionC. Beautiful weather with mild summersD. Jobs on farms and in mines and factoriesSUBMIT The body functions best with a particular set of conditions: an ideal body temperature, blood pressure, blood sugar level, and many other ideal conditions. Which of the following is NOT true regarding homeostasis? A balloon lifts off the ground and reaches a height of 200m. The total mass of the balloon is 1000 kg. What is the GPE of the balloon? Solve for X in the figure below, knowing line L is parallel to line M. Thank you! Will give Brainliest. help me pretty please Bob lives in San Diego and runs a business that sells boats. In an average year, he receives $793,000 from selling boats. Of this sales revenue, he must pay the manufacturer a wholesale cost of $430,000; he also pays wages and utility bills totaling $301,000. He owns his showroom; if he chooses to rent it out, he will receive $15,000 in rent per year. Assume that the value of this showroom does not depreciate over the year. Also, if Bob does not operate this boat business, he can work as a financial advisor, receive an annual salary of $50,000 with no additional monetary costs, and rent out his showroom at the $15,000 per year rate. No other costs are incurred in running this boat business.Identify each of Charles's costs in the following table as either an implicit cost or an explicit cost of selling guitars. a. The wages and utility bills that Charles pays b. The wholesale cost for the guitars that Charles pays the manufacturer c. The rental income Charles could receive if he chose to rent out his showroom d. The salary Charles could earn if he worked as a financial advisor Find the inverse function in slope-intercept form f(x)=4/5x-16 Solve 4x+23+6=18 What major event happened on September 11, 2001, in the United Statesa. The accident at Three Mile Island Nuclear Power Plant occurred.b. Hurricane Andrew struck the United States.c. Terrorists attacked the United States.d. The Japanese attacked Pearl Harbor. I can be formed into a sheet, I am high in luster, and am a very good conductor. I must be a ... ametal bnonmetal cmetalloid dnoble gas