SShortSingh.
Back to feed

Developer Builds Python Terminal Calculator With Loop and Error Handling

0
·3 views

A developer shared their experience building a terminal-based calculator in Python using an infinite loop structure. The project features dynamic float data types and a custom exception guard to prevent crashes from zero-division errors. A key challenge encountered was Python's strict indentation rules, which caused syntax errors when nested conditionals were not properly aligned. The developer learned that consistent use of tabs or four spaces is mandatory in Python to define code blocks correctly. The project served as a hands-on introduction to core Python concepts including loops, conditionals, and exception handling.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Building a Real-Time Sports Odds API: Five Hard Lessons Learned

A development team building a real-time sports odds platform found that web scraping was only a small fraction of the actual engineering challenge. Keeping dozens of scrapers reliably operational around the clock proved far more demanding than writing them initially. The team also struggled with normalizing data across bookmakers, as each source uses different naming conventions and event identifiers for the same matches. Robust monitoring emerged as equally critical as feature development, since silent failures could leave users viewing stale odds without any visible warning. These lessons ultimately shaped PulseScore, a real-time sports odds API that aggregates data from major bookmakers including Bet365, DraftKings, and William Hill through a single consistent interface.

0
ProgrammingDEV Community ·

Developer builds 84 free browser-based tools with no signup, ads, or server tracking

A developer has launched encoder.guru, a collection of 84 free tools that run entirely in the browser, requiring no account creation or server-side data processing. The suite covers a wide range of developer needs, including JWT building and verification, AES-256 encryption, JSON formatting, PDF manipulation, and subnet calculation. Frustration with existing tool sites that displayed heavy ads, required signups, or silently transmitted sensitive data to remote servers motivated the project. All cryptographic operations use the browser's native Web Crypto API, while PDF handling relies on pdf-lib and pdfjs-dist — keeping the toolset lightweight and auditable. The project was built using vanilla HTML, CSS, and JavaScript with no frameworks or build steps, allowing new tools to be shipped quickly.

0
ProgrammingDEV Community ·

Developer Builds Loopress to Bring Git and Composer Workflows to WordPress

A frontend developer with experience in infrastructure-as-code environments built Loopress, a tool designed to modernize WordPress development workflows. The project was inspired by frustrations encountered while building a WordPress site for a family member's online tutoring business, where managing code snippets offered no version history or rollback capability. The developer also found it cumbersome to install Composer packages on WordPress, requiring manual SSH access with no reproducible process. Loopress consists of a CLI for version-controlling code snippets via Git and a plugin that brings Composer dependency management into the WordPress admin panel without requiring SSH. The goal is to make WordPress codebases reviewable and deployable in the same way infrastructure-as-code tools like Terraform handle configuration.

0
ProgrammingDEV Community ·

Walkthrough: Solving Sauna HTB Challenge via Active Directory Enumeration

A cybersecurity researcher documented a step-by-step solution to the Sauna machine on Hack The Box, a platform hosting Capture The Flag (CTF) challenges focused on penetration testing. The target machine ran Active Directory services for a fictional domain called egotistical-bank.local, exposing ports including LDAP, SMB, Kerberos, and WinRM. Using tools such as Kerbrute and LDAP search, the researcher enumerated valid domain usernames including fsmith, hsmith, and Administrator. An AS-REP Roasting attack via Impacket's GetNPUsers.py successfully extracted a Kerberos hash for user fsmith, which was then cracked using Hashcat against the rockyou wordlist. The recovered credentials were used to gain remote access to the machine through Evil-WinRM on port 5985.