This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
INVIRTIENDO CADENAS | |
Crea un programa que invierta el orden de una cadena de texto | |
sin usar funciones propias del lenguaje que lo hagan de forma automática. | |
- Si le pasamos "Hola mundo" nos retornaría "odnum aloH" | |
""" | |
def reverse(text): | |
text_len = len(text) | |
reversed_text = "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# pip install speedtest-cli | |
# upgrade pip if necessary "python -m pip install --upgrade pip" | |
import speedtest | |
# Speed test | |
speed_test = speedtest.Speedtest() | |
# Download Speed | |
download_speed = speed_test.download() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# All rights: Mike Driscoll - Twitter: @driscollis | |
from openpyxl import Workbook, workbook | |
from openpyxl.chart import BarChart3D, Reference | |
def create_excel_data(sheet): | |
data_rows = [ | |
["", "Kindle", "Paperback"], | |
["Python 101", 9.99, 25.99], | |
["Python 201 - Intermediate Python", 9.99, 25.99], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
ch = [1,2,3,4,5,6,7,8,9,0,'Q','W','E','R','T','Y','U','I','O','P','A','S','D','F','G','H','J','K','L','Z','X','C','V','B','N','M'] | |
key = random.sample(ch,8) | |
password = ''.join(str(v) for v in key) | |
print(f"Password: {password}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
user_input = "" | |
calculation_to_units = 24 | |
def days_to_units(num_of_days): | |
return num_of_days * calculation_to_units | |
def validate_and_execute(): | |
try: | |
user_input_number = int(user_input) |