krishna owns N mobile phones (numbered 1 through N) He wishes to sell all of them in the coming next N years by selling exactly one mobile per year.
N = 3
mobile prices = [60000, 60000, 60000]
depreciating 1000rs per every year after selling each mobile
first year mobile price = 60000
second-year decreasing = 1000 depreciation
in this way he sold the mobiles could you please resolve my query
Python Program
Write a program to print the following, Given a word W and pattern P, you need to check whether the pattern matches the given word.The word will only contain letters(can be Uppercase and Lowercase). The pattern can contain letters, ? and *.
? : Can be matched with any single letter.
* : Can be matched with any sequence of letters (including an empty sequence).
If the pattern matches with the given word, print True else False.
Sample Input1
3
Hello *l?
Hell He?ll
Hell ?*
Sample Output1
True
False
True
Sample Input1
3
Hello Hell*
Hell He*ll
Hell hell*
Sample Output1
True
True
False
given an integer number n as input.write a program to print the hollow right angled traingular pattern of n lines.(note:there is a space after each asterisk(*) character)
Develop a Python script that will display the exponentiation of the numbers in every line of a text file where the first number is the base and the second number is the exponent.
TEXT FILE
8 3
4 5
6 2
OUTPUT
512
1024
36
Develop a Python script that will display the exponentiation of the numbers in every line of a text file where the first number is the base and the second number is the exponent.
TEXT FILE
8 3
4 5
6 2
OUTPUT
512
1024
36
Develop a Python program that will display the multiplication table represented by the two non negative integers in a text file. The first integer will be the rows and the second integer will be the columns of the multiplication table.
TEXT FILE
3 5
4 2
OUTPUT
3x5
1 2 3 4 5
2 4 6 8 10
3 6 9 12 15
4x2
1 2 3 4
2 4 6 8
3 6 9 12
4 8 12 16
Develop a Python program that will display the multiplication table represented by the two non negative integers in a text file. The first integer will be the rows and the second integer will be the columns of the multiplication table.
TEXT FILE
3 5
4 2
OUTPUT
3x5
1 2 3 4 5
2 4 6 8 10
3 6 9 12 15
4x2
1 2 3 4
2 4 6 8
3 6 9 12
4 8 12 16
I'm quite into games now, so how about we play In or Out! When a given number is even, the team scores so we shall print "In", but if it's not an even number, then we print "Out". Simple, right?
Now let's get this game started.
Input
A line containing an integer.
35
Output
A line containing a string.
Out
by CodeChum Admin
Let us now try comparing two numbers by letting the user input two different numbers and say "Greater" if the first inputted number is greater than the second one, and "Lesser" if it’s the other way around.
Let's go!
Input
A line containing two different numbers separated by a space.
1.2·1.02
Output
A line containing a string.
Greater
This program allows the user to manage a collection of quotes that is stored in a text file named “data.txt”. Use the “json” module to write data to the text file in JSON format and to read the JSON data from the file back into Python. See Reading 7.1 for details of this. This example data contains the details of three quotes in a list. Each one is a dictionary containing of 4-5 key-value pairs with keys of: • “quote” • “author” • “year” (optional) • “likes” • “loves” The “quote” and “author” keys must contain a quote and its author’s name, however the “year” key/value is only present if the year of the quote is known.