Write a class timeStamp that represents a time of the day. It must have variables to store the number of seconds, minutes and hours passed (insert the values in SSMMHH format). It also must have a function to print all the values. You will also need to overload a few operators (==, !=, <, >, <<)
This input should be a valid integer and must be between 1 and 15 only. If the user enters invalid input, the default level is Level 10. How would I code this?
Write a python program that asks the user for a string input. This input corresponds to an attachment that changes the stats of your gun.
Attachments!
monolithic suppressor: +5 damage, -5 mobility
owc_skeleton_stock : +5 mobility, -8 Accuracy
owc_laser_tactical : +5 accuracy, +5 control
operator_foregrip : +10 control, -2 mobility
Inputs are case-insensitive. E.G. OWC Compensator == owc compensator.
P.S. No imports.
Users can be able to input multiple gun attachments by adding a semicolon; in between the attachments. There must be no whitespace present in the inputs. You might need loops to answer this question.
Print out the final stats of the gun in this format:
Man-O-War Updated Stats!
Damage: {damage}
Fire Rate: {fire rate}
Accuracy: {accuracy}
Mobility: {mobility}
Range: {shooting range}
Control: {control}
Example
User input: owc skeleton stock;owc laser tactical
Output:
Man-O-War Updated Stats!
Damage: 49
Fire Rate: 50
Accuracy: 66
Mobility: 64
Range: 56
Control: 58
Write an algorithm that takes the positive integer ‘n’ as input and returns the exponent 2^n as output. Analyze the time complexity of the algorithm using program step table method.
Sort the following elements using merge sort technique
using the Divide and Conquer strategy. {12,45, 6, 18, 10, 4, 3, 1, 13, 15, 16}
Define a class named as Vehicle Contain data members(Minimum 3) Color, Wheels etc. Contain member functions( Minimum 3) Include a prototype and def of copy constructor A default constructor An Overloaded constructor No Need to define the functions Call the functions using OmniBus in main and use overloaded constructors to set values. Use copy constructors to make copy of OmniBus to a constructor SchoolBus
1 Input
[ 1, 2, 3, 4, 5 ]
1 Output
[ 1, 2, 9, 4, 25 ]
2 Input
[ 2, 4 ]
2 Output
[ 4, 4 ]
"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++];
}
/*not modify above this line */
function main() {
const myArray = JSON.parse(readLine());
/* Write your code here */
Array of String to UpperCase
Sample Input 1
[ 'book', 'table', 'strawberries', 'lemons' ]
Sample Output 1
[ 'BOOK', 'TABLE', 'STRAWBERRIES', 'LEMONS' ]
Sample Input 2
[ 'my best friend', 'florida', 'winter' ]
Sample Output 2
[ 'MY BEST FRIEND', 'FLORIDA', 'WINTER' ]
"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++];
}
/* not modify anything above this line */
Create a file given“Address”with proper ios flags.
.
Write 5 lines in the file and each line should have a Student’s data in the following format:(10)
Name: Address: Phone Number
.
e.g
Alyan: Khayaban-e-Jinnah,UCP: 030012345678
Read the file and display all the numbers
Students
data whose number starts with 0300. (15)
Write the algorithm, draw the flowchart, write and execute the Dart code for the following problem.
A student’s Midterm grade is 60 and the Final Grade is 80. The weight of Midterm and Final exams are % 40 and % 60 respectively.
Find the semester grade for this student.