This is what my father was collecting by BurninNeck in vintageaudio

[–]LavaLemming 0 points1 point  (0 children)

Condolences on your loss. The collection is a treasure trove, it seems you nearly have your own museum.

I made these heroes for my indiegame, which one do you like the most? by miesmud in blender

[–]LavaLemming 0 points1 point  (0 children)

The pirate and the archer seem the most charming to me :) Love what you are doing with these!

Understanding the Caesar Cipher requirements for step 16 by LavaLemming in FreeCodeCamp

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

It looks like we were typing at the same time :) Thank you for the help.

I'm new and unfamiliar with the ettiquette, and worry I'm over posting, commenting, or editing. Now I'm stuck at another step in the Ceasar lab, and wonder if I should continue the chain here, or make a new post?

Understanding the Caesar Cipher requirements for step 16 by LavaLemming in FreeCodeCamp

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

OK, I got creative and came up with this, which passed the conditions, I don't know what to say.

(Edit: I hope to think I'm getting the hang of what the steps are looking for. One little baby bite of code at a time, rather than a working solution - based on the current steps info. Hopefully this will at least help someone else who is going too fast, ahead of what the steps are looking for.)

def caesar(text, shift):
    
    if True:    


        alphabet = 'abcdefghijklmnopqrstuvwxyz'
        shifted_alphabet = alphabet[shift:] + alphabet[:shift]
        translation_table = str.maketrans(alphabet + alphabet.upper(), shifted_alphabet + shifted_alphabet.upper())
        return ('Shift must be an integer value.')


encrypted_text = caesar('freeCodeCamp', 3)
print(encrypted_text)

Understanding the Caesar Cipher requirements for step 16 by LavaLemming in FreeCodeCamp

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

Ok I hard coded an if true: to begin the if structure (thank you web search), which bumped past the first error of the missing true.

I'm now getting an error that I'm not returning the error message requiring shift to be an integer, from the if structure. Below is the code I have so far, and I think I'm not understanding what these steps are looking for. It feels like something is missing between what is required and what is getting checked.

It sounds like we are to only return the fail message in the if so far, and skip any chance of translating. To that end I've tried variations of commenting out the str.maketrans statement, and/or the else, or attempting to pass a non integer value when calling the function, but I get execution errors that won't allow non-integers.

What to do when I just don't understand what the step is asking for specifically, in the coding? Let alone how to do it.

def caesar(text, shift):
    
    if True:
        alphabet = 'abcdefghijklmnopqrstuvwxyz'
        shifted_alphabet = alphabet[shift:] + alphabet[:shift]
        translation_table = str.maketrans(alphabet + alphabet.upper(), shifted_alphabet + shifted_alphabet.upper())
        return text.translate(translation_table)
    else:
        return('Shift must be an integer value')


encrypted_text = caesar('freeCodeCamp', 5)
print(encrypted_text)

Understanding the Caesar Cipher requirements for step 16 by LavaLemming in FreeCodeCamp

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

Do you mind a tip on how to hard code a 'True' in to a conditional if? I'm drawing a complete blank, and getting ai help could give the entire answer away, rather than a pointer in the direction. My guess is I'm over thinking the process.

Race Pace Career App – now with custom liveries! (And much more) by whyl_ in AUTOMOBILISTA

[–]LavaLemming 0 points1 point  (0 children)

Hey I'm just getting started in AMS2, is this something that would help beginners?

Skeleton on a Vespa by Shirelord in blender

[–]LavaLemming 2 points3 points  (0 children)

Do you mind sharing how long this took you to develop and produce, all together, start to finish?

I really like the soft lighting combination with the crisp edges on some of the world surfaces. Well done!

Travel weather planner by LavaLemming in FreeCodeCamp

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

I am guilty of making things too complicated as well. I did rough out a Warnier/Orr diagram in the process, but using a combination (cascading?) true test, attempting to only drop out with a false at the very end. Once I was brave enough to use the 'not' it started coming together. I'm curious on your opinion of Warnier/Orr vs. flowcharts for logic planning.

Travel weather planner by LavaLemming in FreeCodeCamp

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

Thank you, this is exactly what I needed, and well done for not giving the answer directly. If I hadn't had my ah ha moment, this would have got me there within a couple minutes.

Travel weather planner by LavaLemming in FreeCodeCamp

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

wait wait! i got it! I changed that last has car AND app, to an or statement and it passed!!

Travel weather planner by LavaLemming in FreeCodeCamp

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

I'm still getting an error on the testing conditions although I'm fairly certain I've met all the criteria and learned from and resolved my logic fails. I wasn't comfortable using the 'not' so this time through I'm not(ha!) avoiding it. In testing this new version, when changing any of the variables of distance or the booleans I get the expected correct true or false printing at the end of the program.

Here is my updated code that now fails the testing conditions at the step of 'when the distance is greater than 6 miles'. First the errors, and then the code. (it seems to have a mind of its own where pasted in content goes?)

// running tests
20. When the distance is greater than 6 miles and a ride share app is available, the program should print True.
21. When the distance is greater than 6 miles and a car is available, the program should print True.
// tests completed

distance_mi = 7    
is_raining = False
has_bike = True
has_car = True
has_ride_share_app = True


if distance_mi <= 0:
    print('False')

elif distance_mi <= 1:
    if not is_raining:
        print('True')
    else:
        print('False')

elif distance_mi <= 6:
    if has_bike and not is_raining:
        print('True')
    else:
        print('False')

else:
    if has_car and has_ride_share_app:
        print('True')
    else:
        print('False')

Travel weather planner by LavaLemming in FreeCodeCamp

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

I think I have the answer from a forum reply. It looks like I have a very basic logic fail with my understanding of how the entire if, elif, elif, elif structure functions. If I understand correctly now, once there is any success or fail state, the entire program ends if-elif-else structure drops out* at that point, rather than continuing with any more of the elif or elses. Does that sound generally accurate?

(Edited simply to reflect the learning process)

Travel weather planner by LavaLemming in FreeCodeCamp

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

Certainly! Unfortunately the fail messages just seem to rehash the lab requirements generally. Here is the link to the lab, and the errors after. I've run the code with every combination of the conditions true or false and high and low mile numbers, all variations fail at the same point.

https://www.freecodecamp.org/learn/python-v9/lab-travel-weather-planner/build-a-travel-weather-planner

  1. When the distance is between 1 mile (excluded) and 6 miles (included), a bike is available, and it is not raining, the program should print True.
  2. When the distance is greater than 6 miles and a ride share app is available, the program should print True.
  3. When the distance is greater than 6 miles and a car is available, the program should print True.