Write a Python program that will ask the user to enter a word as an input.
Command line argument count program in java
Machine problem 2
Create a Python script that will generate random n integers from a given start and end of a range.
Sample Output:
Value for n:5
Value for start: 1
Value for end : 10
10 8 7 8 3
Given a sorted array of data with lower bound LB and upper bound UB, and items is a given item of information. Using variables BEG,END and MID to denote, respectively,the beginning end and middle locations of a segment of elements of Data. Write a c++ program which finds the location LOC if item in DATA or sets LOC=NULL
Create two numpy arrays and add the elements of both the arrays and store the result in sumArray.
Samuel owns a shoe factory where there are N different machines operated for N different purposes. Each machine has its own motor. In order to avoid resonance, the rotation speed of any 2 machines should at least differ by 2 units. The rotation speed can only be in integer units and the maximum rotation speed of any motor is X units. Given minimum rotation speed of any motor to be 1 unit, you have to help Sam find out the number of different ways he can configure the speed of the motor. Input Specification: input1: N, denoting the number of machines. input 2X, denoting the maximum speed of the motor. Output Specification: Your function should return the total number of configuration modulus 10^4.
Find the Duplicate in the array
Given an myArray write a JS program to find duplicate in the Array.
input1
[1,2,3,4,5,7,7,8]
output1
7
output1
{'light'', "dark", "twinlight"]
"use strict";
process.stdin.resume();
process.stdin.setEncoding("utf-8");
let inputString = "";
let currentLine = 0;
process.stdin.on("data", (inputStdin) => {
inputString += inputStdin;
});
process.stdin.on("end", (_) => {
inputString = inputString
.trim()
.split("\n")
.map((str) => str.trim());
main();
});
function readLine() {
return inputString[currentLine++];
}
function main() {
let myArray = JSON.parse(readLine().replace(/'/g, '"'));
/* Please do not modify anything above this line */
/* Write your code here */
}
Part 1
Write a Python program that does the following.
Part 2
Provide your own examples of the following using Python lists. Create your own examples. Do not copy them from another source.
Provide the Python code and output for your program and all your examples.
Add methods to the classes and subclasses:
In the main code:
Mr Kishan owns a supermarket and he has stored the price of all items in an array. However he wants to now increase the price of all items by Rs 5. Write a program using functions which increments the price of all items by Rs 5 and displays the updated list.