FreeCodeCamp » Python
2,292 FOLLOWERS
Ask questions and share tips related to Python or any tools in the Python ecosystem, and get the best python tutorials and solutions here. FreeCodeCamp is a developer community where you can learn to code for free.
FreeCodeCamp » Python
1h ago
Tell us what’s happening:
Keys must be unique within a dictionary and they can be only immutable data types. This means you cannot use a list or another dictionary as keys.
Add another key age to your dictionary and give it the integer number 2 as value.
idk what is the problem
Your code so far
# User Editable Region
copper = {'species': 'guinea pig', 'age': '2'}
# User Editable Region
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36 OPR/107.0.0.0
Challenge Information:
Learn Algorithm ..read more
FreeCodeCamp » Python
10h ago
(topic deleted by author)
1 post - 1 participant
Read full topic ..read more
FreeCodeCamp » Python
10h ago
ejemplos=[(‘Alegan’,‘Ángela’), (‘Nepal’,‘Panel’), (‘Nacionalista’,‘Altisonancia’), (‘Valora’,‘Álvaro’), (‘Raza’,‘Zara’), (‘Frase’,‘Fresa’), (‘Colinas’,‘Nicolás’), (‘Pagar’,‘Praga’), (‘Integrarla’,‘Inglaterra’), (‘Quieren’,‘Enrique’), (‘Cornisa’,‘Narciso’), (‘Acuerdo’,‘Ecuador’), (‘fotolitográficamente’,‘litofotográficamente’)]
salir =False
while salir is False:
string_1=“”
string_2=“”
print(“seleccione:\n\tIngrese dos strings y verifique si son anagramas\n\tS) salir”)
string_1=input(“Ingrese la primer palabra:”).upper()
string_2=input(“Ingrese la segunda palabra:”).upper()
if string_1==“S” or ..read more
FreeCodeCamp » Python
15h ago
I am new to the site. I 've been working on Password Gererator and found myself stopped at step 35. Is there a way to review the instructional content with out starting from the begining of the lesson? Or maybe the wording could change, because as it reads, I have no idea.,
3 posts - 2 participants
Read full topic ..read more
FreeCodeCamp » Python
22h ago
Tell us what’s happening:
text = ‘Hello World’
shift = 3
alphabet = ‘abcdefghijklmnopqrstuvwxyz’
index = alphabet.find(text[0])
print(index)
print(text.lower)
I cannot see what I am doing wrong can anyone help please? It just keeps saying place function call at the beginning of the line but I have?
Your code so far
# User Editable Region
text = 'Hello World'
shift = 3
alphabet = 'abcdefghijklmnopqrstuvwxyz'
index = alphabet.find(text[0])
print(index)
print(text.lower)
# User Editable Region
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537 ..read more
FreeCodeCamp » Python
1d ago
Tell us what’s happening:
Hi can someone give me this solutions i am trying this for 2 days but I am not able to do this
Your code so far
# User Editable Region
solve_sudoku, puzzle = [
[0, 0, 2, 0, 0, 8, 0, 0, 0],
[0, 0, 0, 0, 0, 3, 7, 6, 2],
[4, 3, 0, 0, 0, 0, 8, 0, 0],
[0, 5, 0, 0, 3, 0, 0, 9, 0],
[0, 4, 0, 0, 0, 0, 0, 2, 6],
[0, 0, 0, 4, 6, 7, 0, 0, 0],
[0, 8, 6, 7, 0, 4, 0, 0, 0],
[0, 0, 0, 5, 1, 9, 0, 0, 8],
[1, 7, 0, 0, 0, 6, 0, 0, 5]
]
# User Editable Region
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHT ..read more
FreeCodeCamp » Python
2d ago
(topic deleted by author)
1 post - 1 participant
Read full topic ..read more
FreeCodeCamp » Python
2d ago
Tell us what’s happening:
i can not understand and go from this step can u help me?
Your code so far
# User Editable Region
text = 'Hello World'
shift = 3
alphabet = 'abcdefghijklmnopqrstuvwxyz'
for char in text.lower():
index = alphabet.find(char)
print(char, index)
new_index = index + shift
new_char = alphabet[new_index]
# User Editable Region
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 6.1; rv:107.0) Gecko/20100101 Firefox/107.0
Challenge Information:
Learn String Manipulation by Building a Cipher - Step 35
freecodecamp.org freeCodeCamp.org
Learn ..read more
FreeCodeCamp » Python
2d ago
Tell us what’s happening:
can anyone help me it is showing me some indent error and not able to get it
Your code so far User Editable Region Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36
text = 'Hello Zaira'
shift = 3
def caesar ():
alphabet = 'abcdefghijklmnopqrstuvwxyz'
encrypted_text = ''
for char in text.lower():
if char == ' ':
encrypted_text += char
else:
index = alphabet.find(char)
new_ ..read more
FreeCodeCamp » Python
2d ago
Tell us what’s happening:
if all is not performing good why ? I followed the instructions of this step
Your code so far
import re
import secrets
import string
def generate_password(length, nums, special_chars, uppercase, lowercase):
# Define the possible characters for the password
letters = string.ascii_letters
digits = string.digits
symbols = string.punctuation
# Combine all characters
all_characters = letters + digits + symbols
while True:
password = ''
# Generate password
for _ in range(length):
password += secrets.choice ..read more