Write a program that reads a string and returns a table of the letters of the alphabet in
alphabetical order which occur in the string together with the number of times each letter
occurs. Case should be ignored. A sample output of the program when the user enters the data
“ThiS is String with Upper and lower case Letters”, would look this this:
a 2
c 1
d 1
e 5
g 1
h 2
i 4
l 2
n 2
o 1
p 2
r 4
s 5
t 5
u 1
w 2
I want very simple code please
You decide to create a program suits.py to tally and sort the cards in a hand. You include your earlier functions pick_cards(n) and print_cards(h), plus four new ones: tally(h), which creates and returns a dictionary with suit as key and count as value, sort_cards(h) which creates and returns a dictionary with suit as key and a list of the face values as value, print_tally(t), which prints the tally, and print_sorted(s), which prints the cards in each suit
Radioactive decay of radioactive materials can be modeled by the equation
A=Aoe^t(in 2/h) , where A is the amount of the material at time t, A0 is the amount at time 0, and h is the half-life. Technetium-99 is a radioisotope that is used in imaging of the brain. It has a half-life of 6 hours. Your program should display the relative amount A/A0 in a patient body every hour for 24 hours after receiving a dose. Note: With the aid of formatting techniques documented in your note, ensure your program output matches that given below. Program Output
1: 0.890899
2: 0.793701
3: 0.707107
4: 0.629961
5: 0.561231
6: 0.500000
7: 0.445449
8: 0.396850
9: 0.353553
10: 0.314980
11: 0.280616
12: 0.250000
13: 0.222725
14: 0.198425
15: 0.176777
16: 0.157490
17: 0.140308
18: 0.125000
19: 0.111362
20: 0.099213
21: 0.088388
22: 0.078745
23: 0.070154
24: 0.062500
You can approximate pi by using the following summation: pi=4(1−1/3+1/5−1/7+1/9−1/11+⋯+(−1)^i+1/2i-1)
Write a program that displays the pi value for i = 10000, 20000, … and 100000. Program Output
3.1414926535900345
3.1415426535898248
3.141559320256462
3.1415676535897985
3.1415726535897814
3.141575986923102
3.141578367875482
3.1415801535897496
3.1415815424786238
3.1415826535897198
1. Data Structures and Algorithms (Project 1)
INSTRUCTIONS:
Create a program using the following features:
* Array
* Class
* Specific Sorting Algorithm
* Specific Searching Algorithm
1. Data Structures and Algorithms (Project 1)
INSTRUCTIONS:
Create a program using the following features:
* Array
* Class
* Specific Sorting Algorithm
* Specific Searching Algorithm
What is "Specific Sorting Algorithm" and "Specific Searching Algorithm"?
* sorting code that uses a specific sorting process, here is the list of sorting algorithms that you will use
Bubble
Selection
Insertion
Merge
Shell
* searching code that uses a specific searching process, here is the list of searching algorithms that you will use
Linear
Binary
Fibonacci
Jump
Count the vowels and consonants in string without including spaces.
class User :
def __int__(self, user_id, username):
self.id = user_id
self.username = username
user_1 = User("001", "allobang")
print(user_1.username)
user_2 = User("002", "Jack")
print(user_2.username)
ACTIVITIES:
1. Finish this code by adding a password attribute.
2. Assign passwords on user_1 and user_2 of your choice.
3. Create 3rd user object.
a. The value of the id should be your student ID number.
b. The value of username should be your first name.
c. Assign the value of the password attribute of your choice.
4. Print the username of 3rd user object.
Find latitude and longitude of first 20 countries with a population greater than or equal to the population limit given below. Use the country details from this dataset(https://cdn.jsdelivr.net/gh/apilayer/restcountries@3dc0fb110cd97bce9ddf27b3e8e1f7fbe115dc3c/src/main/resources/countriesV2.json).
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: 28875
Note: Population limit will change at random intervals. So please make sure answer is computed for the correct population limit
Given an integer number N as input,write a program to print the right angled triangular pattern of N lines..
Note:There is space after each asterisk (*) character.