answer.
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
SashulF [63]
2 years ago
5

You would like the user of a program to enter a customer’s last name. Write a statement thaUse the variables k, d, and s so that

they can read three different values from standard input--an integer, a float, and a string respectively. On one line, print these variables in reverse order with exactly one space in between each. On a second line, print them in the original order with one space in between them.t asks user "Last Name:" and assigns input to a string variable called last_name.

Computers and Technology
1 answer:
mojhsa [17]2 years ago
6 0

Answer:

1st question:

Use the variables k, d, and s so that they can read three different values from standard input an integer, a float, and a string respectively. On one line, print these variables in reverse order with exactly one space in between each. On a second line, print them in the original order with one space in between them.

Solution:

In Python:

k = input()  #prompts user to input value of k i.e. integer value

d = input()  #prompts user to input value of d i.e. float value

s = input()  #prompts user to input value of s i.e. a string

print (s, d, k)  #displays these variable values in reverse order

print (k, d, s)#displays these variable values in original order

In C++:

#include <iostream>    // to use input output functions

using namespace std;   //to identify objects like cin cout

int main() {    //start of main function

  int k;   //declare int type variable to store an integer value

  float d; //  declare float type variable to store a float value

  string s;   //  declare string type variable to store an integer value

  cin >> k >> d >> s;    //reads the value of k, d and s

  cout << s << " " << d << " " << k << endl;     //displays these variables values in reverse order

  cout << k << " " << d << " " << s << endl;   } // displays these variable values in original order

Explanation:

2nd question:

You would like the user of a program to enter a customer’s last name. Write a statement that asks user "Last Name:" and assigns input to a string variable called last_name.

Solution:

In Python:

last_name = input("Last Name:")

# input function is used to accept input from user and assign the input value to last_name variable

In C++:

string last_name;  //declares a string type variable named last_name

cout<<"Last Name: ";  // prompts user to enter last name by displaying this message Last Name:

cin>>last_name; // reads and assigns the input value to string variable last_name

The programs alongwith their outputs are attached.

You might be interested in
Monica needs a printer to use at home. She wants fine-quality prints at an affordable cost. Which printer will help her achieve
Keith_Richards [23]

Answer:

alonol printer

Explanation:

5 0
1 year ago
Bill needs to make a presentation in which he has to represent data in the form of a pyramid. Which feature or menu option of a
andreyandreev [35.5K]

Answer:If you need to use arrows in a chart, which feature or menu option of a word processing program would you use?

A.  

Picture

B.  

Shapes

C.  

Clip Art

D.  

SmartArt

E.  

Charts

Explanation:

7 0
2 years ago
based on the transcript, what did broadcasting the story through the medium of radio allow welles to do?
tamaranim1 [39]

Answer:

It was Halloween morning, in 1938, Orson Welles opened his eyes just to discover himself as the most trending person in the USA. Just the past night, Welles together with his Mercury Theatre performed the radio adaption of the Wars of the Worlds, written by H.G. Wells. He transformed around 40 years old novel into the false news edition which broadcasted the news of Martian attack on New Jersey.

Explanation:

It was Halloween morning, in 1938, Orson Welles opened his eyes just to discover himself as the most trending person in the USA. Just the past night, Welles together with his Mercury Theater performed the radio adaption of the Wars of the Worlds, written by H.G. Wells. He transformed around 40 years old novel into the false news edition which broadcasted the news of Martian attack on New Jersey. Just previously it was Halloween night, and hence, this was expected. And various listeners of the show were shocked, and they made a lot of crazy calls to the nearby Police Stations, as well as the newspaper publication houses. The radio stations tried to convince various journalists that the radio episode was able to cause hysteria throughout the USA. And by the very next dawn, the front column of each new newspaper from coast to coast together with the headlines related to the huge panic inspired allegedly by the CBS broadcast.

8 0
1 year ago
Although the optical discs are all 5 ¼”, a CD drive can not read a DVD disc, and a DVD drive can not read a Blu-ray disc. Why no
otez555 [7]

Answer:

For storing the data into a CD, we need to burn it. And the surface of the CD is comprised of the polycarbonate layer that is molded as the spiral tracks over the surface of the CD. And the Data is being stored as a sequence of minute grooves that are called the pits which are encoded on the spiral tracks. And the region in between the pits is known as lands.

The DVD or the digital video dos is based on the optical data storage which is almost the same as the CD. The analog data is transformed into the digital data, and this is encoded on the disc starting from the inside edge, and towards out. This digital information is being encoded into the surface as pits, and the surface acts as the recording layer. A DVD can hold data up to 4.77 to 8 GB.

Since DVD size is bigger than CD, A DVD drive can read CD, but the CD drive cannot read the DVD,

And unlike the above two, which make use of the red laser for reading and writing, the blu ray makes use of the blue laser. Also, it has the smaller pits, tiny beam as well as small track that together make it possible to store around 25 GB of data in one single blue ray disc. And this is five times more than the size of a DVD.  

The Blu ray Discs are good for playing the CD as well as DVD. However, the opposite is not possible due to the size.

Explanation:

Please check the answer section.

4 0
2 years ago
Consider the two relations with their schemas as listed below: Employee(name, empID, birthDate, gender, address, phone) TaxAccou
Allushta [10]

Answer:

CREATE TABLE TaxAccount (

Name int NOT NULL,

SSN int NOT NULL,

empID int FOREIGN KEY REFERENCES employee(empID),

federalDeductionAmt int NOT NULL,

stateDeductionAmt int NOT NULL,

ficaDeductionAmt int NOT NULL

);

Explanation:

TaxAccount table will use the primary key of employees table 'empID' which will serve as foreign key in TaxAccount table.

Therefore TaxAccount table will look like this:

CREATE TABLE TaxAccount (

Name int NOT NULL,

SSN int NOT NULL,

empID int FOREIGN KEY REFERENCES employee(empID),

federalDeductionAmt int NOT NULL,

stateDeductionAmt int NOT NULL,

ficaDeductionAmt int NOT NULL

);

5 0
1 year ago
Other questions:
  • In object oriented programming, what is another name for the "attributes" of an object?
    14·1 answer
  • When conducting research, protecting the privacy of patients requires careful attention to ensure ?
    11·2 answers
  • if you had two proxy servers located in the same room, what use could you make of them? nothing create a hub sell one of the ser
    14·2 answers
  • How has the perception of the hacker changed over recent years? What is the profile of a hacker today?
    5·1 answer
  • A common fallacy is to use MIPS (millions of instructions per second) to compare the performance of two different processors, an
    15·1 answer
  • A shipping company uses the following function to calculate the cost in dollars of shipping based on the weight of the package (
    6·1 answer
  • Write multiple if statements: If carYear is before 1968, print "Probably has few safety features." (without quotes). If after 19
    6·1 answer
  • Performing binary search on an unsorted list will always return the correct answer in O(n) time where n is the length of the lis
    9·1 answer
  • Which of the following is not true of how computers represent complex information
    5·2 answers
  • They predicted another cold day in Seattle. They predicted another windy day in Seattle. Combine the sentences into one sentence
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!