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
Kisachek [45]
3 years ago
15

In Python

Computers and Technology
1 answer:
kondor19780726 [428]3 years ago
5 0

Answer:

x=input("Please enter a decimal number: "); y=input("Please enter another decimal number: "); print("The sum of the numbers is: " + (x+y) + ".")

You might be interested in
Pointers with classes a) A user-defined class named Timer has a constructor that takes two integer parameters to initialize hour
klemol [59]

Answer:

Check the explanation

Explanation:

a) there is a need to create an allocated object of dynamic ability for the Timer class, and assign it to a pointer variable timePtr.

As we are going to create an object of timer class, so timePtr will be a pointer of type timer class. Hence, left side of the statement will be as follows.

Timer* timePtr

Now, to create an object in a dynamic way, we use new operator in C++. And at last, we need to call the constructor to create the object. So, the full statement will be as follows:

                        Timer* timePtr = new Timer (10, 20);

b)

//c++ code : a:

#include <iostream>

using namespace std;

class Timer

{

public:

int hr;

int minute;

Timer(int h,int min)

{

h=h+min/60;

min=min%60;

hr=h;

minute=min;

}

};

int main()

{

Timer *t=new Timer(10,20);

cout<<"Time : "<<t->hr<<" hr :"<<t->minute<<" min"<<endl;

return 0;

}

c)

//c++ code for b, c:

#include <iostream>

#include <stdlib.h>

#include <time.h>

using namespace std;

int* randfun_alloc(int n)

{

srand (time(NULL));

int *arr=new int[n];

for(int i=0;i<n;i++)

arr[i]=rand()%1000;

 

return arr;

}

int main()

{

int n;

cin>>n;

int *arr =randfun_alloc(n);

 

for(int i=0;i<n;i++)

cout<<arr[i]<<" ";

 

cout<<endl;

delete[] arr;//delete the allocated array

return 0;

}

Documents: bash Konsole File Edit View Bookmarks Settings Help raushan-HP-2000-Notebook-PC /Documents > g++ randarr.c

8 0
3 years ago
#5 Multiple Select Which of the following describes a hardware error? Select 3 options.
DENIUS [597]

Answer:

A, E

Explanation:

Hope this is correct

7 0
3 years ago
Read 2 more answers
What is internal storage device
Assoli18 [71]
Something like a hard drive.
5 0
3 years ago
What is the output?
goldenfox [79]

Answer:

7.0

Explanation:

i got it wrong to get the answer

4 0
3 years ago
Read 2 more answers
The c++ operator _______________ is used to destroy dynamic variables.
UNO [17]
<span>The c++ operator delete is used to destroy dynamic variables.</span>
6 0
3 years ago
Other questions:
  • Which statement is true about customizing presentation programs?
    6·1 answer
  • Explain what might happen if two stations are accidentally assigned the same hardware address?
    15·1 answer
  • Pablo can view a minimum of_____ panes and a maximum of_____ panes in a split screen worksheet.
    7·1 answer
  • . Suppose that name is a variable of type string. Write the input statement to read and store the input Brenda Clinton in name
    5·1 answer
  • Mack has started with his first photographic assignment for a magazine. He has clicked around thirty images and uploaded them on
    10·1 answer
  • Summarize the four critical issues for cyber warfare.
    6·1 answer
  • Write a program that asks the user how many numbers will be entered and then has the user enter those numbers. When this is done
    7·1 answer
  • Consider we have n pointers that need to be swizzled, and swizzling one point will take time t on average. Suppose that if we sw
    11·1 answer
  • How do i copy a canvas course from old class to new course.
    12·1 answer
  • enter formula that uses the IF function to test whether the number of years of experience (cell M5) is greater than or equal to
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!