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
weqwewe [10]
2 years ago
13

Read two numbers from user input. Then, print the sum of those numbers. Hint -- Copy/paste the following code, then just type co

de where the questions marks are to finish the code. num1 = int(input()) num2 = ? print(num1 + ?) Note: Our system automatically runs your program several times, trying different input values each time to ensure your program works for any values. Notes on how to solve this. See How to Use zyBooks for info on how our automated program grader works
Computers and Technology
2 answers:
Luba_88 [7]2 years ago
6 0

Answer:

num1 = int(input("Enter the first number "))

num2 = int(input("Enter the first number "))

print(num1 + num2)

Explanation:

Using Python programming language.

The input function is used to prompt a user to enter the first and sencond numbers

These are saved in the variables num1 and num2 respectively.

Using the print function, the sum of num1 and num2 are evaluated and printed

arlik [135]2 years ago
6 0

Answer:

The solution code is written in Python 3:

  1. num1 = int(input("Enter first number: "))  
  2. num2 = int(input("Enter second number: "))
  3. print(num1 + num2)

Explanation:

Firstly, we use input function to prompt user input first and second number (Line 1 -2). We can include the prompt message as the argument of input function. Besides, we also convert the input to integer type using int() function. By default all the input are string.

At last, use print function to display the result of num 1 + num2 (Line 3)

You might be interested in
Get user input as a boolean and store it in the variable tallEnough. Also, get user input as a boolean and store it in the varia
frozen [14]

Answer:

I will code in JAVA.

import java.util.Scanner;

public class Main {

public static void main(String[] args) {

 

boolean tallEnough;

boolean oldEnough;

Scanner input = new Scanner(System.in);

tallEnough = input.nextBoolean();<em> //wait the input for tallEnough</em>

oldEnough = input.nextBoolean(); <em>//wait the input for OldEnough</em>

   if(tallEnough && oldEnough){

   System.out.print(true);

   } else {

   System.out.print(false);

   }

}

}

Explanation:

First, to accept user inputs you have to import the class Scanner. Then declare both variables before allowing the user to set input values for both boolean variables.

In the if-else statement checks if both variables are true, then prints true. Another case prints always false.

8 0
2 years ago
Var name = prompt("Enter the name to print on your tee-shirt");
Vinil7 [7]

Willy Shakespeare has 17 characters. It's higher than 12,so the output will be Too long. Enter a name with fewer than 12 characters.

Letter a.

3 0
2 years ago
In this exercise we look at memory locality properties of matrix computation. Th e following code is written in C, where element
Sonja [21]

Answer:

Explanation:

temporal locality can be defined as: when a particular memory  is referenced or accessed several times  within a specific period of time. In the question, i think the variable that exhibit temporal locality are I, J and 0(all the variable). This is because the variable J and 0 are accessed several times within the loop. I would not have been part of it, but in the A[I][J]=B[I][0]+A[J][I], the variable "I" is also accessed in the addition. this is why it is part of the temporal locality.

4 0
2 years ago
How would you categorize the software that runs on mobile devices? Break down these apps into at least three basic categories an
I am Lyosha [343]

Mobile software is an App that can be downloaded to a mobile device and used to execute specific tasks. Once the app is initiated, it runs inside the operating system until it is been closed by the user. These are small, individual software units which can work as a browser, game, shopping app, calculator and more.


There are mainly 3 types of mobile apps:

Native applications, Hybrid applications, and Web applications.


Native Applications:

Native applications are developed to be used on a particular platform or device. They exist on the device and are accessed through icons on the device. Native apps are written for specific Operating System, which means a separate source code is written for each OS, such as iOS, Android, Linux, and Windows, this means, a native Android software will not work on a windows platform, because the Windows platform does not have the source code to operate the software, however, the advantages of native applications is that they can take the full advantage all features in the devices’


Web Application:

Web application (Web app) is a client-server software application, in which the client runs in a web browser. It is stored on a remote server and delivered over the Internet through a browser interface. It is not designed for a specific type of device or an operating system, which means it can be accessed from several devices. Web applications commonly use a combination of server-side script (ASP, PHP, etc) and client-side script (HTML, Javascript, etc.) to be developed.


Hybrid Applications:

Hybrid applications have the characteristic of both web applications and native applications. They combine the elements of both native and Web applications. They are developed using HTML, CSS, and Javascript, and then wrapped into a native application using platforms like Cordova. Since they are designed for various platforms, they don’t require different source codes like native apps, Web application development is obviously faster, simpler and rapid.

5 0
2 years ago
Read 2 more answers
def retry(operation, attempts): for n in range(attempts): if operation(): print("Attempt " + str(n) + " succeeded") ___ else: pr
marusya05 [52]

Answer:

Following are the missing code to this question:

break;

Explanation:

In the given python code, a method "retry" is defined, that accepts two-variable, that is "operation and attempts" in its parameters, inside the method a for loop is defined that uses the n variable to holds attempt values and define the conditional statement.

  • Inside if block, it checks if the operation value is true, it will print a successful attempts values and break the condition, otherwise it will goto else block.
  • In the else block, it will print failed attempts values.  
6 0
2 years ago
Other questions:
  • A(n) _____ can be used to reveal a competitor’s program code, which can then be used to develop a new program that either duplic
    9·1 answer
  • Float_abs - return bit-level equivalent of absolute value of f for * floating point argument f. * both the argument and result a
    8·1 answer
  • When a typeface does not have any extra embellishments on the top and bottom of the letterforms, it is called a ________ font?
    12·1 answer
  • What are the arguments for writing efficient programs even though hardware is relatively inexpensive?
    10·1 answer
  • Prompt: Which references and reference formats are you most likely to use? Why?<br><br><br> ED2020
    13·2 answers
  • 14. Emelia is very concerned about safety and has conducted a study to determine how many bike helmets were replaced at each loc
    13·2 answers
  • Define a method named roleOf that takes the name of an actor as an argument and returns that actor's role. If the actor is not i
    8·1 answer
  • 1. Write a set of routines for implementing several stacks and queues within a single array. Hint: Look at the lecture material
    15·1 answer
  • Write a SELECT statement that selects all of the columns for the catalog view that returns information about foreign keys. How m
    6·1 answer
  • In this code, identify the repeated pattern and replace it with a function called month_days, that receives the name of the mont
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!