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
maw [93]
4 years ago
15

Given the variables full_admission_price and discount_amount (already defined), write an expression corresponding to the price o

f a discount admission.
You are given two variables, both already defined, one associated with a float and named total_weight, containing the weight of a shipment, the other associated with an int and named quantity, containing the number of items in the shipment. Write an expression that calculates the weight of one item.

Write a for loop that prints all the even integers from 80 through 20 inclusive, separated by spaces.

Use Python
Computers and Technology
1 answer:
stiks02 [169]4 years ago
7 0

Answer:

if full_admission_price = f and discount_amount = d

=> Price of a discount admission = d/f

total_weight

quantity

weight of one item = total_weight/quantity                      

for i in range(80, 18, -2):

   print(i, end=' ')

Explanation:

The first two questions are just mathematical to get a single quantity given some relationship. So, its basically division

For the python code, I used the python's range function which takes in three arguments. The first one is the starting value, the second one is the terminating value which is the number before the terminating value and the last one specifies the common difference popularly known as step in the language. Since the step is 2, only even numbers are printed out. In the print function, I made use of the end keyword specifying a space (' ') as the end. This ensures that the print is done in the same line with a space seperating them. Without that specification, each result will printed in a newline

You might be interested in
think about any special skills or passions you have and describe a way you might apply them to earn money.
liraira [26]

Answer:

The answer to this question is given below in the explanation section

Explanation:

There are different skills or passions that you can use to earn handsome money.

Being a computer student, I have a passion for web development. I have skills in Wordpress, HTML and PHP. I used these skills to develop static and dynamic websites for clients and for companies.

Even, If I will not get a job in some companies and I want to work online according to my own pace and time. I can use freelancing, and doing the online job and providing services to clients online, I can earn more money than doing a traditional job.

7 0
3 years ago
50 pts
Aloiza [94]

Answer:

I would do newWord = word1 * word2

Explanation:

seems best for combining words. It wouldn't be - or == and + seems more math while * seems more combining words.

7 0
3 years ago
Read 2 more answers
1. It manages the computer's memory and processes, as well as all of its software and hardware.
8_murik_8 [283]

Answer:

B. Computer operating system

Explanation:

the operating system (or OS) manages all of the hardware and software in the computer, and allows hardware and software to communicate.

We can also figure this out by process of elimination: Application software is just a fancy way to say apps, Graphical User Interface (or GUI) are menus that allow a user to use the computer through a visual representation (what you interact with using your mouse), and microcomputer just means a small computer like a laptop or a phone.

6 0
3 years ago
Under which condition below would you expect a glassy extrusive rock like obsidian to form?
agasfer [191]
Hihi!

The correct answer would be D. Quick cooling on Earth's surface! Obsidian is<span>a volcanic rock formed by the rapid solidification of lava without crystallization!

I hope I helped!
-Loliarual
</span>
7 0
4 years ago
Read 2 more answers
Write a method that accepts a String object as an argument and returns a copy of the string with the first character of each sen
emmainna [20.7K]

Answer:

The programming language is not stated; However, the program written in C++ is as follows: (See Attachment)

#include<iostream>

using namespace std;

string capt(string result)

{

result[0] = toupper(result[0]);

for(int i =0;i<result.length();i++){

 if(result[i]=='.' || result[i]=='?' ||result[i]=='!')  {

 if(result[i+1]==' ') {

  result[i+2] = toupper(result[i+2]);

 }

 if(result[i+2]==' ')  {

  result[i+3] = toupper(result[i+3]);

 }

 } }

return result;

}

int main(){

string sentence;

getline(cin,sentence);

cout<<capt(sentence);

return 0;

}

Explanation:

<em>The method to capitalize first letters of string starts here</em>

string capt(string result){

<em>This line capitalizes the first letter of the sentence</em>

result[0] = toupper(result[0]);

<em>This iteration iterates through each letter of the input sentence</em>

for(int i =0;i<result.length();i++){

This checks if the current character is a period (.), a question mark (?) or an exclamation mark (!)

if(result[i]=='.' || result[i]=='?' ||result[i]=='!')  {

 if(result[i+1]==' '){  ->This condition checks if the sentence is single spaced

  result[i+2] = toupper(result[i+2]);

-> If both conditions are satisfied, a sentence is detected and the first letter is capitalized

 }

 if(result[i+2]==' '){ ->This condition checks if the sentence is double spaced

  result[i+3] = toupper(result[i+3]);

-> If both conditions are satisfied, a sentence is detected and the first letter is capitalized

 }

}

}  <em>The iteration ends here</em>

return result;  ->The new string is returned here.

}

The main method starts here

int main(){

This declares a string variable named sentence

string sentence;

This gets the user input

getline(cin,sentence);

This passes the input string to the method defined above

cout<<capt(sentence);

return 0;

}

Download cpp
7 0
4 years ago
Other questions:
  • To delete a note, select the note reference mark in the footnote text by dragging through the note reference mark, and then clic
    6·1 answer
  • The device used to attach a microphone to a lectern is called a ____.
    10·1 answer
  • Syah work as senior designer in creative design company. he is an imaginative person and always updates himself with the latest
    15·1 answer
  • Write a program which will use a template version of search function(4 points): Randomly generate a list of 100 integers(1 point
    11·1 answer
  • Explain the usage of the keywordtransient?
    9·1 answer
  • Money from a Coverdell Education Savings Account can be used for:
    11·1 answer
  • Typical business cards in the U.S. are _____.
    5·1 answer
  • The information that’s displayed in a datalist control is defined by _____.
    10·1 answer
  • Tanya wants to include an instructional video with all its controls on her office website. The dimensions of the video are as fo
    10·1 answer
  • ______ controls are information security safeguards that focus on the application of modern technologies, systems, and processes
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!