Question: Please program like begginer! copy / paste solutions from chat gpt are no welcome! Please dont just use chat gpt and copy paste solutions. Program

Please program like begginer! copy/paste solutions from chat gpt are no welcome!
Please dont just use chat gpt and copy paste solutions. Program like beginner!
Task 1. Count the vowels and consonants
Wite a count_vowels_consonants() function that takes a string and returns a dictionary with the number of vowels i by the number of consonants in the text.
```
vowels = "aeiouABIOU"
consonants = "bedfghjklmnpqrstvwxyzBCDFGHJKLMNPQRSTVNXYz"
example:
```
```
velo popularan.*
print (count_vowels_conscmanta (tekse))
i('vowels': 30, 'consonanta': 46)
```
Task 2.
Exercise 14: Prime numbers
1. Write a function isPrime() that receives an integer and returns True if the number is prime, and False if it is not A prime number is a natural number greater than 1 that is divisible only by 1 and itself.
Example:
\[
\begin{array}{l}
\text { print(iaPrime(7))\# True }\\
\text { print(isPrime(10))\& Palse }
\end{array}
\]
2. Write a function primes_in_range() that receives two arguments: start and end and returns a list of all prime numbers in that range.
Example:
\[
\text { print (primes_in_range }\{1,10)\text {)}\mathbb{H}[2,3,5,7
\]
Task 3: Write the following functions:
1. A function that returns an n-tuple with the first and last elements of a list in one line of code.
```
1ista =[1,2,3,4,5,6,7,8,9,10]
prlat(previ_i_2adnjl(1Lsta))+(1,10)
```
2. A function that n-tuples the maximum and minimum element of the list, without using built-in functions
```
115ta =[5,10,20,50,100,11,250,50,30]
```
3. A function that receives two sets and returns a new set with the elements contained in both sets.
```
skup_1={1,2,3,4,5}
skum_2-14,5,6,3,8t
print(presjeklakup_1, akup_21)|{4,5}
```
Task 4. Turn the dictionary over
Write a function that receives a dictionary and returns a new dictionary in which the keys and values have been replaced. Example:
```
prist(ateni_rimenik(rimenib))
+['Ivan': 'ine', 'Trie'= 'prenime', 25: 'dbb'}
```
Task 5. Grouping elements by parity
White a function that receives a list of numbers and returns a dictionary with two lists: one for even numbers and one for odd numbers.
```
110ta =[1,2,3,4,5,6,7,3,9,101
priat(graptraf_pe_paritetu(1iata))
Example:
```
Please program like begginer! copy / paste

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!