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
azamat
2 years ago
7

CODEHS 3.5.4 Obi-Wan Says

Computers and Technology
1 answer:
Likurg_2 [28]2 years ago
5 0

The program receives inputs for the name, number of droids and wookiees a user wants and displays the information as a complete sentence. The program written in python 3 goes thus :

name = input('Enter name : ')

<em>#</em><em> </em><em>prompts</em><em> </em><em>user</em><em> </em><em>of</em><em> </em><em>name</em><em> </em>

num_droid = int(input('number of droids : '))

<em>#prompts</em><em> </em><em>for</em><em> </em><em>number</em><em> </em><em>of</em><em> </em><em>droids</em><em> </em>

num_wooks = int(input('number of wookiees : '))

<em>#prompts</em><em> </em><em>for</em><em> </em><em>number</em><em> </em><em>of</em><em> </em><em>wookiees</em><em> </em>

print(name, ' wants to meet', num_droid, 'droids and',num_wooks , 'Wookiees' )

<em>#displays</em><em> </em><em>the</em><em> </em><em>information</em><em> </em><em>as</em><em> </em><em>a</em><em> </em><em>complete</em><em> </em><em>sentence</em><em> </em>

<em>A</em><em> </em><em>sample</em><em> </em><em>run</em><em> </em><em>of</em><em> </em><em>the</em><em> </em><em>program</em><em> </em><em>is</em><em> </em><em>attached</em><em> </em>

<em>Learn</em><em> </em><em>more</em><em> </em><em>:</em><em> </em><em>brainly.com/question/25506437</em>

You might be interested in
"running computer programs and their data are stored in ___"
Lesechka [4]

Solution:

Running computer programs and their data are stored in Rom.

ROM is "built-in" computer memory containing data that normally can only be read, not written to. ROM contains the programming that allows your computer to be "booted up" or regenerated each time you turn it on. Unlike a computer's random access memory (RAM), the data in ROM is not lost when the computer power is turned off. The ROM is sustained by a small long-life battery in your computer.

5 0
3 years ago
Read 2 more answers
PLSSSSS HELPP!! Population biologists are concerned about invasive species such as the zebra mussel found in North American wate
elixir [45]

Answer: A.The introduced species compete for resources more effectively than native species.

Explanation:

An introduced species is also called the exotic species and this is an organism which is not a native organism or specie and therefore isn't native to the place but rather it's being transported to the place through the activities of human being.

When the introduced species are introduced to a particular area, they compete with the natives for the available resources and often do this more effectively than the other native species.

Therefore, the correct option is A.

4 0
3 years ago
it is a program a personal computer microprocessor uses to get the computer system started after you turn it on​
Fofino [41]

Explanation:

please repeat your question

5 0
3 years ago
Write the definition of a function divide that takes four arguments and returns no value . The first two arguments are of type i
Nastasia [14]

Answer:

#include <iostream>

using namespace std;

void divide(int numerator, int denominator, int *quotient, int *remainder)

{

*quotient = (int)(numerator / denominator);

*remainder = numerator % denominator;

}

int main()

{

int num = 42, den = 5, quotient=0, remainder=0;

divide(num, den, &quotient, &remainder);

 

return 0;

}

Explanation:

The exercise is for "Call by pointers". This technique is particularly useful when a variable needs to be changed by a function. In our case, the quotient and the remainder. The '&' is passing by address. Since the function is calling a pointer. We need to pass an address. This way, the function will alter the value at the address.

To sum up, in case we hadn't used pointers here, the quotient and remainder that we set to '0' would have remained zero because the function would've made copies of them, altered the copies and then DELETED the copies. When we pass by pointer, the computer goes inside the memory and changes it at the address. No new copies are made. And the value of the variable is updated.

Thanks! :)

8 0
2 years ago
Which Call of Duty game is the best?
love history [14]

Answer:

i like ghost and modern 3

Explanation:

3 0
3 years ago
Other questions:
  • When working in excel online, which of the following is considered a conditional formula?
    8·2 answers
  • May indicate elevation
    14·2 answers
  • a user reports that his dot matrix printer is printing dark and clear on the left of the paper but that the print is very light
    6·1 answer
  • Which of the following are not parts of a message? Select all that apply.
    12·1 answer
  • Is 5g harmful to the body ?
    9·2 answers
  • # q7 - create function readFileFirstLast() to meet the conditions below
    10·1 answer
  • Describe the main roles of the communication layer, the network-wide state-management layer, and the network-control application
    15·1 answer
  • Plz..... Add the following Binary numbers 1. 111000 + 1100 + 111111​
    6·1 answer
  • Can a dod activity enter into a service contract for a military flight simulator without getting a waiver from the secretary of
    13·1 answer
  • A program that converts a program to binary all at once and runs the entire program when finished with the conversion.
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!