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
Likurg_2 [28]
2 years ago
9

4.2 Code Practice: Question 1 Can someone help me write the code in python language?

Computers and Technology
1 answer:
alekssr [168]2 years ago
8 0

Answer:

number = int(input("Enter a number: "))

sum = number

c = 1

while (sum<=100):

   number = int(input("Enter a number: "))

   sum = sum + number

   c = c + 1

print("Sum: " + str(sum))

print("Numbers Entered: " + str(c))

Explanation:

Hope this helps lovely :)

You might be interested in
Before you ever buy your first stock or bond, it's important to understand what type of investor you are. This depends on a numb
Oksi-84 [34.3K]

Answer:

Moderate investor

Explanation:

The moderate investors are most popularly known as 'Balanced investors'. They accepts the risk to principal and they adopt the balanced approach. They mainly uses a mixture of bonds and stocks.

They values the reducing risks and then enhancing the returns equally. They accepts modest risks so as to ensure higher long term returns.

6 0
2 years ago
A detective agency is looking to bust an arms sale. According to available intelligence, the sale is likely to happen in one of
Paha777 [63]

Answer:

Probability Distribution={(A, 4/7), (B, 2/7), (C, 1/7)}

H(X)=5.4224 bits per symb

H(X|Y="not C")=0.54902 bits per symb

Explanation:

P(B)=2P(C)

P(A)=2P(B)

But

P(A)+P(B)+P(C)=1

4P(C)+2P(C)+P(C)=1

P(C)=1/7

Then

P(A)=4/7

P(B)=2/7

Probability Distribution={(A, 4/7), (B, 2/7), (C, 1/7)}

iii

If X={A,B,C}

and P(Xi)={4/7,2/7,1/7}

where  Id =logarithm to base  2

Entropy, H(X)=-{P(A) Id P(A) +P(B) Id P(B) + P(C) Id P(C)}

=-{(1/7)Id1/7 +(2/7)Id(2/7) +(4/7)Id(4/7)}

=5.4224 bits  per symb

if P(C)  =0

P(A)=2P(B)

P(B)=1/3

P(A)=2/3

H(X|Y="not C")= -(1/3)Id(I/3) -(2/3)Id(2/3)

=0.54902 bits per symb

4 0
2 years ago
Which is a requirement for searching for a template
Lina20 [59]

Answer:

umm... you did not discribe the anwsers, i cannot help you

8 0
3 years ago
Which type of computer application is apple keynote? a. word processor b. spreadsheet c. presentation d. database e. multimedia
Naily [24]

The type of computer application which apple keynote is, is: c. presentation.

<h3>What is a presentation application?</h3>

A presentation application can be defined as a type of computer application which is designed and developed to avail its end users an ability to create various slides that comprises both textual and multimedia information, which are typically used during a presentation.

This ultimately implies that, apple keynote is an example of a presentation application which is used on computers.

Read more on presentation application here: brainly.com/question/26404012

#SPJ4

4 0
2 years ago
3. Write a method squareOfAsterisks that displays a solid square (the same number of rows and columns) of asterisks whose side i
iren2701 [21]

Answer:

Following are the program to this question:

#include <iostream>//defining header file

using namespace std;

void squareOfAsterisks(int x) //defining method squareOfAsterisks

{

   int i,j; //defining integer variable

   for(i=1;i<=x;i++) //defining loop to print column value

   {

   for(j=1;j<=x;j++) //defining loop to print row value

   {

   cout<<"*"; //print value

   }

   cout<<endl; //for line break

   }

}

int main() //defining main method

{

int x; //defining integer variable

cout<<"Enter any number: "; //print message

cin>>x; //input value from user

squareOfAsterisks(x); //calling the method and pass the value

return 0;

}

Output:

Enter any number: 4

****

****

****

****

Explanation:

The description of the above program can be given as follows:

  • In the given program a method "squareOfAsterisks" is declared, that accepts an integer value "x" in its arguments, inside the method two integer variable I, j is used, that uses a to print the given pattern.
  • In the main method, an integer variable x is declared, which takes input from the user end, and then calls the method, that is "squareOfAsterisks" and passes its value.
8 0
2 years ago
Other questions:
  • Samantha was calculating a mathematical formula on an electronic spreadsheet. She used multiple values to recalculate the formul
    12·2 answers
  • Click to review the online content. Then answer the question(s) below, using complete sentences. Scroll down to view additional
    7·1 answer
  • You are an inventor. You are taking out an ad in a newspaper because you want people to buy/use your product/invention. Include
    9·1 answer
  • Which line of code will print I can code on the screen?
    13·1 answer
  • suppose as a head software engineer you assign the job of creating a class to a subordinate. You want to specify thirty-eight di
    11·1 answer
  • The concept of "plug and play" is demonstrated by which of the following<br> scenarios?
    13·1 answer
  • (Display characters) Write a method that prints characters using the following header: public static void printChars(char ch1, c
    6·2 answers
  • The advancement of technology in our daily lives has changed how we interact with the world.
    10·1 answer
  • Select the correct answer from each drop-down menu.
    5·2 answers
  • Record the issue of 4,000 shares of $5 par value common stock for $35000 cash
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!