#Python syntax
Explore tagged Tumblr posts
Text
Understanding Python Syntax: A Beginner's Guide
Learn the basics of Python syntax, including its simple and readable structure, to write clean and effective code. Ideal for beginners and those exploring Python programming.
0 notes
Text
i've spent 1.5 years studying and achieving a level of C/C++ literacy to go to a class, which is really cool, basis of machine learning and genetic based algorithms and i am a sucker for biology but we're applying those in python. what sucks is that now my brain and hands literally itch to put semicolons and curly brackets and indent the code to my needs and implement methods and functions when python doesn't even use those :( and now i can do more powerful things but the code looks like we've just discovered how to paint caves with our fingers
#personal ramblings you can totally skip#but it's bugging me a lot#and i know python is a great way as an outsider to get into coding and do some really cool stuff because it has a lot of built in libraries#and the syntax is closer to english than most coding languages#but it's a bit frustrating to me and i lose time trying to rephrase what i've learned so far#the only advantage so far is that instead of writing like 3 different functions for a vector in c/c++#i only use like 3 lines of code in python for the same things#my frustrations could also be from the fact that i went to this class where we used python straight from a 3 hour class where we used c
4 notes
·
View notes
Text
I've been depressed the last couple of weeks so I decided to watch an Bee and Puppy Cat and please tell me why I saw Java snippet of subtracting and adding to the digits of Pi???
I kind find interesting they decided to write in Java, which is a multi platform language well known and stablished in the Industr and who is Jackson Nathan???
#bee and puppycat#i noticed syntax error and data types misha dling but you know#but i mean its a cartoon about a little robot and a intergalactic cat taking temp jobs#so it wasnt like i was expecting accuracy so it was a pleasant surprise#interesting choice using java of all laguages#it would be a good idea to learn java#but im barely holding it together with Python and JavaScript#they work well for me in the meantime#maybe in the future
2 notes
·
View notes
Text
took a break from programming for my work and instead do programming in a game lmao
#there's a game called joy of programming and I have been playing with it for a while#I keep forgetting python syntax lmao but seeing the conveyor belt go brrrr is fun
2 notes
·
View notes
Text
#Code #Language #Scripts #DearDearestBrands #Playstation7
🩵
Here's an example of how the Jest language could work in both a script format and real-world applications.
Example Script in Jest
Scenario: A game designer uses Jest to create an interactive NPC dialogue system for a fantasy role-playing game.
// Define characters character("Bard", mood: "cheerful") { greet(player) { if (player.items.includes("Golden Lyre")) { say("Ah, I see you carry the Golden Lyre! Shall we perform a duet?"); offer("Duet", "Teach me a new song."); } else { say("Greetings, traveler! Care to share a tune?"); offer("Yes", "No"); } } onResponse("Duet") { play("Golden Lyre"); gainItem("Sheet Music of the Ancients"); say("Marvelous performance! Here's something to remember me by."); } }
Real-World Applications
Game Development
Use Case: The Jest script can be implemented in indie or large-scale games to simplify NPC scripting. Game developers can design branching storylines, dynamic dialogues, and item-based interactions without needing extensive coding expertise.
Impact: Streamlines the creation of complex dialogue systems, making games richer and more engaging.
Digital Storytelling Platforms
Use Case: Writers can use Jest to create choose-your-own-adventure narratives or interactive webcomics.
Impact: Helps storytellers visualize and test different plot paths dynamically.
Education
Use Case: Jest can be introduced in classrooms to teach logic and programming fundamentals through fun, narrative-based activities.
Impact: Makes programming accessible and enjoyable, especially for younger students.
Business Applications
Use Case: Jest scripts could power customer support chatbots or training simulations for employees, blending structured interactions with adaptive responses.
Impact: Provides a natural, human-like interaction layer for learning and problem-solving.
Art Installations
Use Case: Artists might use Jest to script interactive digital displays, where viewers can engage with elements that change based on their input.
Impact: Enhances viewer engagement with immersive storytelling.
Would you like examples tailored to any specific field, or a deeper dive into how this concept could integrate with existing platforms like Unity or web development frameworks?
// Define characters character("Bard", mood: "cheerful") { greet(player) { if (player.items.includes("Golden Lyre")) { say("Ah, I see you carry the Golden Lyre! Shall we perform a duet?"); offer("Duet", "Teach me a new song."); } else { say("Greetings, traveler! Care to share a tune?"); offer("Yes", "No"); } } onResponse("Duet") { play("Golden Lyre"); gainItem("Sheet Music of the Ancients"); say("Marvelous performance! Here's something to remember me by."); } }
// Define characters and interactions character("Bard", mood: "cheerful") { greet(player) { if (player.items.includes("Golden Lyre")) { say("Ah, traveler! Is that the Golden Lyre you hold? Shall we create music together?"); offer("Perform duet", "Decline politely"); } else { say("Greetings! Would you share a tune with me?"); offer("Yes", "No"); } } onResponse("Perform duet") { play("Golden Lyre"); gainItem("Ancient Song Sheet"); say("Brilliant! Here’s a gift to remember this melody."); } }
Here’s a refined version of the Jest language application example with enhanced clarity and focus:
Jest Language Example
Scenario: A Jest script powers a dynamic, interactive dialogue system for a role-playing game (RPG).
// Define characters and interactions character("Bard", mood: "cheerful") { greet(player) { if (player.items.includes("Golden Lyre")) { say("Ah, traveler! Is that the Golden Lyre you hold? Shall we create music together?"); offer("Perform duet", "Decline politely"); } else { say("Greetings! Would you share a tune with me?"); offer("Yes", "No"); } } onResponse("Perform duet") { play("Golden Lyre"); gainItem("Ancient Song Sheet"); say("Brilliant! Here’s a gift to remember this melody."); } }
Real-World Applications
Game Development
Implementation: This script integrates seamlessly into Unity or Unreal Engine for RPGs, enabling developers to craft branching, adaptive dialogue trees.
Outcome: Simplifies complex storytelling logic, making NPCs more responsive and enhancing player immersion.
Education Technology
Use Case: Teachers design interactive historical role-plays. For example, students engage with historical figures like Galileo scripted in Jest, solving problems based on their era.
Impact: Promotes engagement and critical thinking in educational environments.
AI-Powered Virtual Assistants
Scenario: Jest can script realistic conversational flows for customer support AI, creating adaptive interactions based on user input.
Benefit: Makes conversations more natural and personalized, improving user experience.
Creative Writing Platforms
Tool: Authors use Jest to draft "choose-your-own-adventure" stories, previewing branching plots interactively.
Result: Allows immediate testing of story dynamics and reader engagement.
Interactive Exhibits and Art
Application: Jest enables immersive experiences in digital art installations, where the script determines responses to viewer actions.
Example: A museum exhibit reacts to visitor choices, offering personalized narratives based on selected artifacts.
Expanded Benefits of Jest
Simplicity: Uses intuitive syntax, making it accessible for non-programmers.
Adaptability: Scales across industries like gaming, education, and customer service.
Integration: Works with existing systems like Unity for games, GPT-based APIs for chatbots, and creative platforms for digital storytelling.
Would you like a more in-depth integration guide for a specific tool or industry?
#playstation7#deardearestbrands#ps7#framework#python#Harmony#Thread#Canvas#Chord#Cryptic#Fable#Bridge#Morph#Syntax#Facet#pantomime#Code#Script
6 notes
·
View notes
Text
I like my women how I write my Python;
Sloppy and statically typed.
3 notes
·
View notes
Text
Why is coding so frustrating fellas
4 notes
·
View notes
Text
clocking in for another shift of staring at my final project jupyter notebook and my incomprehensible python code held together with nothing but hope and tears but still somehow runs
#i am not a cs major#i took my first python class in september#and now i am here#somehow my code works every time even for projects where i think i am failing hard#truly my knowledge of syntax is just pure vibes. i know nothing deeper and yet somehow im still chugging
5 notes
·
View notes
Text
who knew making gifs would involve writing so much code 😵💫
#possibly mostly because i don't have ps#and gimp is atrociously slow with gifs#so i'm writing python for vapoursynth#and for batching some imagemagick calls#because batch file syntax is a nightmare. who designed this.#i spent over an hour trying to write a bat script and it didn't work#and i did it in 15 min in python despite not having used py in a decade#ok /rant thanks for listening#personal
7 notes
·
View notes
Text
match/case is just if/elif with less steps. it should really be cmp/jeq
A non-binary robot with if/then pronouns. Is this anything
#im assuming thats about python's match/case? i don't know of another language w/ that syntax#i spent way too long reading about x86 assembly to make that joke
50K notes
·
View notes
Text
WORK ETHIC AND IDEAS
Better how? Plenty of people work just as well to let a big company. The second or third tier firms have a much higher break rate—it could be because you're living in the wild must feel better to a wide-ranging predator like a lion. If you're going to get replaced. One founder I know wrote: Two-firm deals are great. The word startup dates from the 1960s, but many companies continued to write code to close a certain deal, go ahead and start startups, this sparsely occupied territory is becoming more fragmented, the world as a whole to. The central issue is picking the right companies. If it takes years to articulate great questions, what do you do about it.
One upshot of which is: You shouldn't put the blame on one parent, because divorce is never only one person's fault. For example, jam, bacon, pickles, and cheese, which are two of the most egregiously unlispy pieces of syntax in Common Lisp, some delimiters are reserved for the language, so they leave them to create whatever social organization they want. Some didn't even have computers. Do Better I don't mean to imply that good design has to be finite, and the reason most don't is that they know what they're going to flake. Even if your only goal is to please them, the way tapestries and mosaics are made in the innovative atmosphere of startups instead of the people have half the total wealth, they tend to be fairly conservative, and within the company the people in the US. When you demo, don't run through a catalog of features. They assume ideas are like miracles: they either pop into your head. Observation bears this out: within the US, and they are something of a hole. Richard Hamming suggests that you ask yourself what would I tell my own kids?
Thanks to Nancy Cook, David Sloo, Daniel Gackle, Lisa Randall, Paul Buchheit, Jessica Livingston, and Eric Raymond for their feedback on these thoughts.
#automatically generated text#Markov chains#Paul Graham#Python#Patrick Mooney#companies#Common#syntax#Richard#people#deal#issue#startups#founder
0 notes
Text
have to use python for class.... this freeking stinks
#part of it is a skill issue#the other part is my distaste for python's syntax and for loosely typed languages
1 note
·
View note
Text
Explained in Depth: The IndentationError - Expected an Indented Block
The IndentationError: expected an indented block is an error commonly encountered in programming languages like Python that rely on indentation to define the structure of code blocks. Unlike languages that use braces {} or keywords like begin and end to denote blocks of code, Python uses indentation to signify the beginning and end of code blocks.
This error occurs when the interpreter or compiler encounters a situation where it expects a properly indented code block but does not find one. There are several common reasons for this error:
Mismatched Indentation Levels: This occurs when there is inconsistency in the number of spaces or tabs used for indentation within a code block. Mixing spaces and tabs or using different numbers of spaces can lead to this error.
Missing Colon at the End of a Control Flow Statement: Python uses colons (:) to indicate the beginning of a new code block, such as with if, else, for, or while statements. Omitting the colon after such statements can result in an IndentationError.
Empty Code Blocks: Having an empty code block without any indented statements can also trigger this error. For example, defining a function without any indented code inside it can lead to an IndentationError.
To resolve the IndentationError: expected an indented block, it is essential to review the code and ensure the following:
Consistent indentation: Use either spaces or tabs consistently throughout the code, avoiding mixing them within the same block.
Correct colon placement: Verify that control flow statements (such as if, else, for, while) are followed by a colon, indicating the start of a new code block.
Meaningful code inside blocks: Ensure that code blocks, such as functions or control flow statements, contain meaningful indented code inside them.
By paying attention to these factors and maintaining consistent indentation practices, develop
if you like to learn more about it then please visit analyticsjobs.in
#Python Beginners#Coding Standards#Syntax Errors#Software Development#Programming Education#Code Quality
0 notes
Text
suddenly losing access to your group directory, where the files you need to run your code are stored, also feels like running into a glass door
#tütensuppe#just why??#first python threw me a real weird syntax error message#(i cant see an error there. in fact i havent changed that file at all since the last work i did on the project where it ran just fine)#then i activated and deactivated my virtual env and now my group dir access has evaporated#edit: its only on this one machine. wtf
1 note
·
View note