Question

PROGRAM PYHTON

Write a function called "calculateInput" that when called, it asks the user to enter an number. Then, it asks for a second number. These will use the "input" command. Store these as two separate variables. This function takes NO arguments and is also a VOID function, there is no return statement. The function should print the result of these two numbers multiplied together. The program should be able to multiply floats.

For example:

Test | Input | Result |
---|---|---|

calculateInput() |
5 2 |
Please enter an integer: 5 Please enter a second integer: 2 10.0 |

calculateInput() |
3.5 7 |
Please enter an integer: 3.5 Please enter a second integer: 7 24.5 |

calculateInput() |
5 5 |
Please enter an integer: 5 Please enter a second integer: 5 25.0 |

calculateInput() |
12 3 |
Please enter an integer: 12 Please enter a second integer: 3 36.0 |

calculateInput() |
100 52 |
Please enter an integer: 100 Please enter a second integer: 52 5200.0 |

Answer:(penalty regime: 0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100 %)

Answer #1

```
def calculateInput():
n1=float(input("Please enter an integer: "))
n2=float(input("Please enter a second integer: "))
print(n1*n2)
calculateInput()
```

NOTE : PLEASE COMMENT BELOW IF YOU HAVE CONCERNS.

I AM HERE TO HELP YOUIF YOU LIKE MY ANSWER PLEASE RATE AND HELP ME IT IS VERY IMP FOR ME

in c++
Write a C++ program that asks the user to enter an integer
number and prints it back "vertically" to the screen. Use recursion
in your solution. As an example of how the program will work:
Please enter an integer: 12345
The integer you entered will print vertically as:
1
2
3
4
5

Find the error in the following psuedocode
// This program asks the user to enter a number between 1 and 5
and validates the input.
Declare Integer number
// Get a number from the user.
Display "Enter a number between 1 and 5."
Input number
// Make sure the number is between 1 and 5.
While number < 1 AND number > 5
Display "ERROR: The number must be between 1 and 5. "
Display "Enter a number between 1...

Q :
Write a C++ program that asks the user to enter
three integers and then
displays the largest one.
Example :
if the user enter ( 7, 2 ,5) the largest number will be 7
Or if user enter ( 2 , 5 , 7 ) the largest number will be 7
Or if user enter ( 7, 5 ,2) the largest number will be 7
In general it does not matter the order of the entered numbers...

Write a mips assembly language program that asks the
user to enter and integer number and read it. Then ask him to enter
a bit position (between 0 and 31) and display the value of that
bit.

Please use Python 3
4). Write a program that asks the user to enter 10 numbers. The
program should store the numbers in a list and then display the
following data:
• The lowest number in the list •
The highest number in the list
•The total of the numbers in the list
• The average of the numbers in the list
Sample input & output:
(Prompt) Enter Number 1: (User enter) 4
(Prompt) Enter Number 2: (User enter) 7...

(SumDigits.java) Write code that asks the user to enter an
integer between 100 and 999. The program finds and displays the
three digits in the number. The program also calculates and
displays the sum of the three digits.
A sample run is shown below: Enter a number between 100 and 999:
528 The three digits in the number are: 5 2 8 The sum of the three
digits is: 15 Note: You must use integer division and modulo
division to...

Write a program that asks the user to enter an odd number and
prints out a triangle pattern. For example, if the user enters 5,
the output is
note: There is one space between the numbers in each
line
1 3 5
1 3
1
If the user enters 9 the output is:
1 3 5 7 9
1 3 5 7
1 3 5
1 3
1
program language: C++

- Write a Python program which asks the user to enter a number,
if the number is divisible by 6 or 7, the program prints “The
number X is divisible by 6 or 7” and if the number is neither
divisible by 6 nor by 7, then it prints “The number X is not
divisible by 6 and 7”.

[10 marks] (SumDigits.java) Write code that asks the user to
enter an integer between 100 and 999. The program finds and
displays the three digits in the number. The program also
calculates and displays the sum of the three digits. A sample run
is shown below:
Enter a number between 100 and 999: 528
The three digits in the number are: 5 2 8
The sum of the three digits is: 15

Write a program that prompts
the user to enter an integer number between 1 and 999. The program
displays the sum of all digits in the integer if the input is
valid; otherwise, it displays a message indicating that the integer
is not between 1 and 999 and hence, is invalid.
Name the program file Q1.cpp
Example: if the user enters 12, sum of digits is
3.
If the user enters 122, sum of digits is 5.

ADVERTISEMENT

Get Answers For Free

Most questions answered within 1 hours.

ADVERTISEMENT

asked 17 minutes ago

asked 42 minutes ago

asked 42 minutes ago

asked 47 minutes ago

asked 1 hour ago

asked 1 hour ago

asked 1 hour ago

asked 1 hour ago

asked 1 hour ago

asked 1 hour ago

asked 1 hour ago

asked 2 hours ago