Given an integer
The first line of input is an integer
In the example, the given starting number is
10, and the number of rows in the pyramid is 5.
write a python program to find modules , exponentiation , power.
a company is planning a big sale at which they will give their customers a special promotional discount. each customer that purchases a product from the company has a unique customer id numbered from 0 to n-1.
1.andy, the marketing head of the company, has selected bill amounts of the n customers for the promotional scheme. the discount will be given to the customers whose bill amounts are perfect squares. the customers may use this discount on a future purchase. write an algorithm to help andy find the number of customers that will be given discounts?
an ecommerce website wishes to find the lucky customer who will be eligible for full value cashback. for this purpose, a number n is fed to the system. it will return another number that is calculated by an algorithm. in an algorithm, a sequence is generated, in which each number is the sum of the two preceding numbers. initially, the sequence will have two 1's in it. the system will return the nth number from the generated sequence which is treated as the order id. the lucky customer will be the one who has placed that order. write an algorithm to help the website find the lucky customer.
an ecommerce company plans to give their customers a discount for the new year. the discount will be calculated on the basis of the bill amount is the product of the sum of all odd digits and the sum of even digits of the customer's total bill. if no odd-even digit is represented in the bill amount then 0 will be returned?
1.usernum=int(input())
2.user Numspuared= userNum +User Num
3.
4.print(userNumspuared, end=‘ ‘)
python implement data structures?
startmsg = "python"
endmsg = ""
for i in range(1,1+len(startmsg)):
endmsg = startmsg[-i] + endmsg