class Student:
# Constructor
def _init_(self):
self.id_number = 0
self.grades_list = []
self.grades_total = 0
Given a string on one line, output the length of that string. End with a newline.
Ex: If the input is:
Fuzzy bear
the output is: 10
by CodeChum Admin
Create a class called Appliance. An appliance simply has a:
Power status, brand and cost should not be accessible out the class or its hierarchy of inheritance
Write a c++ program to find the length of the skirting board.Where she wants to replace the old skirting board and the coving 2.7,4.1m 32m(All dimensions in Meter)with the door of 0.86 x 2.06meters
Read from the user the maximum number of rolls of toilet paper that may be ordered. Require the maximum number of rools that may be ordered to be an integer from 1 to 10, inclusive. If the user enters a number that is out of range, make them try again until they enter an acceptable number.
Similarly make the user enter the price of one roll of toilet paper as a decimal number of dollars and cents from ten cents(0.10) to three dollars(3.00) inclusive.
Print a table showing the number of rolls in the table for all number of rolls from 1 to the maximum number that the user specified. Each row in the table shows the number of rolls and the price for that number of rolls.
Example:
User enters maximum number of rolls as 48; make them try again.
User enters maximum number of rolls as 4; that is acceptable.
User enters the price per roll as 14.10; make them try again.
User enters the price per roll as -2.70; make them try again.
User enters the price per roll as 0.10; which is acceptable.
Print:Prompt the user to input two integers: firstNum and secondNum note that firstNum
Print "userNum1 is negative." if userNum1 is less than 0. End with newline.
Assign userNum2 with 1 if userNum2 is greater than 10. Otherwise, print "userNum2 is less than or equal to 10.". End with newline.
Maximum Profit
You given a list of prices where prices[i] is the price of a given stock o the i th day write a program to print the maximum profit by choosing a single day to buy a stock and choosing a different day in the future to sell that stock if these is no profit that can be achieved return 0
INPUT
The input is a single line containing space seperated integers.
OUTPUT
The output should be an integer.
Explanation
in the example the given prices are 7 1 5 3 6 4
buying stocks on day two having price 1 and selling them on the fifth day having price 6 would give the maximum profit which is 6 - 1
so the output should be 5.
sample input 1
7 1 5 3 6 4
sample output 1
5
sample input 2
1 11 13 21 19
sample output 2
20
String Concatenation
Disha has three strings A, B, and C consisting of lowercase letters.She also has a string T consisting only of characters 1, 2 and 3.
She wants to concatenate the three strings according to the characters in T.
Your task is to print the final output string.
Note: Formally, follow the below instructions:
* For each integer i such that 1<=i<=|T|, let the string si be defined as follows:
*Concatenate the strings s1,s2,...,s|T| in this order and print the resulting string.
Sample Input1
mari
to
zzo
1321
Sample Output1
marizzotomari
Number Game
A group of people are playing a game.They are standing and each carring a card with a number on it.These numbers in the list A. A random number S iis selected.
Find out the new list of numbers after
Sample Input1
1,2,3
1
Sample Output1
2 3
1 2