Posts by Marcello Fabrizio • 47 points
5 posts
-
0
votes0
answers109
viewsQ: How do the functions malloc( ) and calloc( ) work in C?
I know that both functions allocate a memory space in bytes and returns the address of that memory, where calloc frees this space while in malloc the release must be made by the function free. But…
-
-2
votes1
answer603
viewsQ: Error: "can’t Multiply Sequence by non-int of type 'float'"
I’m making this simple unit converter. I need him to do: Calculation of average speed in Km/h; Print this result. Then, in another function, I need to convert it to m/s and print the result again.…
-
0
votes1
answer70
viewsQ: I’m getting None in output
l = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89] num = int(input(print("Choose a number: "))) new_list = [] for i in l: if i < num: new_list.append(i) print(new_list) I’m doing this exercise that asks…
-
0
votes3
answers78
viewsA: Difficulty with first code
elemento = str((input("Insira um elemento químico: "))) alcalinos = ('Li', 'Na', 'K', 'Rb', 'Cs', 'Fr') alcalinos_terrosos = ('Be', 'Mg', 'Ca', 'Sr', 'Ba', 'Ra') metais_de_transicao = ('Sc', 'Y',…
-
2
votes3
answers78
viewsQ: Difficulty with first code
This is my first code that doesn’t involve my class. My goal is to assemble a code that asks you to insert any chemical symbol and this will tell your group. Pretty simple concept, but I’m having a…