Find latitude and longitude of utmost 20 countries, ordered by population, with a population greater or equal to the population limit given below and have atleast one currency exclusively for themselves. (countries like Madagascar, Sri Lanka but not India, USA). Use the country details from this dataset.
Your task is to find the sum of the length of all lines (in kms) that can be drawn between co-ordinates of these countries.
Assume radius of earth: 6371 km
Round length of each line and final result to 2 decimal points
If co-ordinates are missing for any country use 0.000 N 0.000 E
Population limit: 65110000
Note: Population limit will change at random intervals. So please make sure answer is computed for the correct population limit before submitting.
1000 : 8
500 : 1
100 : 0
50 : 1
20 : 2
5 : 0
1 : 3
how to remove spaces before and after :
denominatio problem
Input 10 numbers. Put it in a list. Turn every item of a list into its square. Print the result.
Expected output:
Enter Input 1
Enter Input 2
Enter Input 3
Enter Input 4
Enter Input 5
Enter Input 6
Enter Input 7
Enter Input 8
Enter Input 9
[1, 4, 9, 16, 25, 36, 49, 64, 81]
Note: the inputs are used for demonstration purposes only. Use yor own combination of inputs.
leap year or not, divisible by 100 , 400(leap year)
divisible by 4 (non leap year i.e false
input:2016
output:true
code to display day name.
day_names= ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday' , 'Sunday']
input:3
output:wednesday
Armstrong numbers between two intervals
Write a program to print all the Armstrong numbers in the given range
A to B(including A and B). An N-digit number is an Armstrong number if the number equals the sum of the Nth power of its digits.
Input
The first line has an integer
A. The second line has an integer B.
Output
Print all Armstrong numbers separated by a space.
If there are no Armstrong numbers in the given range, print
-1.
Explanation
For
A = 150 and B = 200
For example, if we take number 153, the sum of the cube of digits
1, 5, 3 is
13 + 53 + 33 = 153.
So, the output should be
153.
Sample Input 1
150
200
Sample Output 1
153
Sample Input 2
1
3
Sample Output 2
1 2 3
important: please tell me how can we print -1 if there is no armstrong number
Number Game
write a program to print the following
Input
The first line input containing the comma separated integers.
The second line of input is integer.
Sample Input1
1,2,3
1
Sample Output1
2 3
1 2
anil is given a sentence as he tries to make a sentence special a sentence can be made special by swapping the character with high frequency with the character having low frequency in the sentence help anil by transforming the sentence into. a special sentence in python.
swap most frequent letter with least given a sentence, swap the occurrences of the most frequenti with the least frequent letter and vice-versa. submisdong note: • consider upper and lower case letters as different . if there are multiple letters with the same frequency, choose the lower case letter that comes earliest in dictionary order o if letters like x and b have same frequency consider x o if letters like x and b have same frequency consider b.
Input: Python is a programming language
Output should be: Python is e progremming lenguega
Input : check your blood pressure frequently
Output : check ybur olbbd pressure frequently
Lowest and highest score. The teacher gave out the scores of the science quiz conducted last week and asked the ones with the lowest and highest scores to group up. Print the names of the students with minimum and maximum scores, respectively.
Note: In case of a tie, choose the name which comes first in the (dictionary order).
Input : 2
shakti 24
disha 26
output: shakti disha
input: 3
ajay 23
bijay 24
sanjay 23
output: ajay bijay