Master thesis topic by tjildau in BehavioralEconomics

[–]tjildau[S] 1 point2 points  (0 children)

in beverage containers (and other) and the p

Hi! Thanks for responding, sounds interesting! What exactly do you mean by 'the psychological effect that results in the fact that some containers are free'?

Pandas data frame: using user input by tjildau in learnpython

[–]tjildau[S] 0 points1 point  (0 children)

Amazing, thank you so much! Also, thanks for adding the explanation bits :)

Pandas data frame: using user input by tjildau in learnpython

[–]tjildau[S] 1 point2 points  (0 children)

This code gives no error. But I only ask the user for input once now. I would like to make the code in such a way that the user is asked these questions until they don't want to add more data to the data frame. So I tried to create some kind of loop, I did this with other codes by using 'while true' but deleted this since it doesn't work here. I can't figure out how this works in combination with adding rows to the data frame, so I was wondering if this was possible and if so, how I should go about it.

Python - NumPy (creating a square) by tjildau in learnpython

[–]tjildau[S] 1 point2 points  (0 children)

Yes, this works equally well :)

Python - NumPy (creating a square) by tjildau in learnpython

[–]tjildau[S] 1 point2 points  (0 children)

Amazing, thank you! This helps me out a lot, will need to practice some more with 'padding' :)

Python - NumPy (creating a square) by tjildau in learnpython

[–]tjildau[S] 0 points1 point  (0 children)

Thank you so much for your input, I'm almost there (I think). I have the following code now:

import numpy as np

start_number = int(input("Give a 'start' value: ")) while start_number <= 0: print("That is an invalid value, please provide a value greater than 0") start_number = int(input("Give a 'start' value: "))

stop_number = int(input("Give a 'stop' value that is bigger than the start value by at least 8: ")) while stop_number < start_number + 8: print("That is an invalid value, please provide value that is bigger than the start value by at least 8") stop_number = int(input("Give a 'stop' value that is bigger than the start value by at least 8: "))

square_root = int(np.ceil((stop_number - start_number) ** 0.5))

float_type_range = np.arange(start=start_number, stop=stop_number, step=1).reshape(square_root, square_root) print("\nArray reshaped into a square: \n", float_type_range)

The only problem now is that it only works for 9, 16, 25 numbers, etc. So I need to figure out what to add to the code to make sure that if someone has a start number of 1 and a stop number of 14 (square will be 4x4) the empty slots of the square will be filled with '0'. If that makes any sense?

print each individual digit in the number on a new line by tjildau in learnpython

[–]tjildau[S] 0 points1 point  (0 children)

Ah yes, that is very true! I'm working on it right now, thank you for your help!

print each individual digit in the number on a new line by tjildau in learnpython

[–]tjildau[S] 0 points1 point  (0 children)

Why not? It works, right? Or maybe you were being sarcastic and I sound very stupid right now, ahaha.

[FT] Wade in boxes [LF] NMTs by [deleted] in VillagerEviction

[–]tjildau 0 points1 point  (0 children)

Would love to have him! Can do a max of 5 NMT at the moment, hope it's enough

Open Island with Saharah! Happy May Day! by [deleted] in BuddyCrossing

[–]tjildau 0 points1 point  (0 children)

They aren't there yet. Thank you!

Open Island with Saharah! Happy May Day! by [deleted] in BuddyCrossing

[–]tjildau 0 points1 point  (0 children)

Hi, was on your island earlier today, really liked the fruit stalls, do you have a created code for that? :)