1-pip install matplotlib==3.7.1
Collecting matplotlib==3.7.1
Downloading matplotlib-3.7.1.tar.gz (38.0 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 38.0/38.0 MB 51.3 MB/s eta 0:00:00
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: contourpy>=1.0.1 in /usr/local/lib/python3.12/dist-packages (from matplotlib==3.7.1) (1.3.3)
Requirement already satisfied: cycler>=0.10 in /usr/local/lib/python3.12/dist-packages (from matplotlib==3.7.1) (0.12.1)
Requirement already satisfied: fonttools>=4.22.0 in /usr/local/lib/python3.12/dist-packages (from matplotlib==3.7.1) (4.63.0)
Requirement already satisfied: kiwisolver>=1.0.1 in /usr/local/lib/python3.12/dist-packages (from matplotlib==3.7.1) (1.5.0)
Requirement already satisfied: numpy>=1.20 in /usr/local/lib/python3.12/dist-packages (from matplotlib==3.7.1) (2.0.2)
Requirement already satisfied: packaging>=20.0 in /usr/local/lib/python3.12/dist-packages (from matplotlib==3.7.1) (26.2)
Requirement already satisfied: pillow>=6.2.0 in /usr/local/lib/python3.12/dist-packages (from matplotlib==3.7.1) (11.3.0)
Requirement already satisfied: pyparsing>=2.3.1 in /usr/local/lib/python3.12/dist-packages (from matplotlib==3.7.1) (3.3.2)
Requirement already satisfied: python-dateutil>=2.7 in /usr/local/lib/python3.12/dist-packages (from matplotlib==3.7.1) (2.9.0.post0)
Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.12/dist-packages (from python-dateutil>=2.7->matplotlib==3.7.1) (1.17.0)
Building wheels for collected packages: matplotlib
Building wheel for matplotlib (pyproject.toml) ... done
Created wheel for matplotlib: filename=matplotlib-3.7.1-cp312-cp312-linux_x86_64.whl size=11118728 sha256=488c0e3d5ba3fcefbf683b5ff2bab55cbedefa7b04f37de9ac0312c71ba040e1
Stored in directory: /root/.cache/pip/wheels/1c/06/fa/3453aac11411fac092c1bdfe52815f2f6969a42700d977e62f
Successfully built matplotlib
Installing collected packages: matplotlib
Attempting uninstall: matplotlib
Found existing installation: matplotlib 3.10.0
Uninstalling matplotlib-3.10.0:
Successfully uninstalled matplotlib-3.10.0
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
plotnine 0.14.5 requires matplotlib>=3.8.0, but you have matplotlib 3.7.1 which is incompatible.
inequality 1.1.2 requires matplotlib>=3.8, but you have matplotlib 3.7.1 which is incompatible.
arviz 0.22.0 requires matplotlib>=3.8, but you have matplotlib 3.7.1 which is incompatible.
pointpats 2.5.5 requires matplotlib>=3.9, but you have matplotlib 3.7.1 which is incompatible.
Successfully installed matplotlib-3.7.1
WARNING: The following packages were previously imported in this runtime:
[matplotlib,mpl_toolkits]
You must restart the runtime in order to use newly installed versions
2-import numpy as np
3-
import random
lista = [8, 12, 54, 23, 43, 1, 90, 87, 105, 77]
numero_escolhido = random.choice(lista)
print(f"O número escolhido aleatoriamente foi: {numero_escolhido}")
import random
lista = [8, 12, 54, 23, 43, 1, 90, 87, 105, 77]
numero_escolhido = random.choice(lista)
print(f"O número escolhido aleatoriamente foi: {numero_escolhido}")
4-
import random
numero_sorteado = random.randrange(1, 100)
print(f"O número sorteado foi: {numero_sorteado}")
O número sorteado foi: 75
5-
import math
base = int(input("Digite o primeiro número inteiro (base): "))
expoente = int(input("Digite o segundo número inteiro (expoente): "))
resultado = math.pow(base, expoente)
print(f"O resultado de {base} elevado a {expoente} é: {int(resultado)}")
Digite o primeiro número inteiro (base): 10
Digite o segundo número inteiro (expoente): 5
O resultado de 10 elevado a 5 é: 100000
6-
import random
total_participantes = int(input("Digite o número total de participantes no sorteio: "))
numero_sorteado = random.randint(1, total_participantes)
print(f"O número sorteado que ganhou o prêmio foi: {numero_sorteado} ")
import random
total_participantes = int(input("Digite o número total de participantes no sorteio: "))
numero_sorteado = random.randint(1, total_participantes)
print(f"O número sorteado que ganhou o prêmio foi: {numero_sorteado} ")
7-
import random
nome = input("Por favor, digite o seu nome: ")
token = random.randrange(1000, 10000, 2)
print(f"Olá, {nome}, o seu token de acesso é {token}! Seja bem-vindo(a)!")
Por favor, digite o seu nome: Marcelo
Olá, Marcelo, o seu token de acesso é 6262! Seja bem-vindo(a)!