r/Coding_for_Teens • • 2h ago

Can you spot the bug? 2 cookies, and the bill says Rs 22222222222222222222

1 Upvotes

A café's bill machine charged a customer Rs 22222222222222222222 for 2 cookies. It should say Rs 40. Here's the code:

```python

cookie_price = 20

cookies = input("How many cookies: ")

total = cookie_price * cookies

print("Total: Rs", total)

```

The cashier typed 2. Where does it go wrong, and why that weird number?

Put your answer in a spoiler if you can so others can try too. I'll explain it in the comments later.

(I made this one for a free Python practice site I'm building, tryline.dev, where every lesson ends with a bug like this. Mostly curious whether it's too easy or too hard for people just starting out.)


r/Coding_for_Teens • • 2h ago

Pls check this out

1 Upvotes

r/Coding_for_Teens • • 5h ago

How to plan and build a winning Congressional App Challenge project (starting now before pre-registration opens)

Thumbnail reddit.com
1 Upvotes

r/Coding_for_Teens • • 7h ago

Join hackathon community

Thumbnail
reddit.com
1 Upvotes

r/Coding_for_Teens • • 20h ago

Need advice

Thumbnail reddit.com
1 Upvotes

r/Coding_for_Teens • • 1d ago

Time Complexity & Space Complexity — Understanding How Efficient Your Code Is.

Thumbnail reddit.com
1 Upvotes

r/Coding_for_Teens • • 1d ago

IIIT Delhi student teaching coding from scratch: C, C++, Python, Java

Post image
1 Upvotes

r/Coding_for_Teens • • 2d ago

What should I use

Thumbnail reddit.com
1 Upvotes

r/Coding_for_Teens • • 2d ago

Introduction to Data Structures and Algorithms

Thumbnail reddit.com
1 Upvotes

r/Coding_for_Teens • • 2d ago

Search English buddy, probably for Python

3 Upvotes

Heyyy, I'm french and 16 y/o, I search a buddy (or multiple buddy) to perfect my english. I want serious people that also programming and that can commit at least some hours per week. Actually I'm mostly on python (making a discord bot) but I really want to learn other languages so if you're not on python it's okayyyy (EXCEPT WEB DEV).
Edit: I want to learn C++


r/Coding_for_Teens • • 2d ago

WHAT IS your biggest problem in learning any coding language

Thumbnail reddit.com
1 Upvotes

r/Coding_for_Teens • • 2d ago

IIIT Delhi student teaching coding from scratch: C, C++, Python, Java

Post image
1 Upvotes

r/Coding_for_Teens • • 2d ago

Looking for 2nd-Year B.Tech CSE Girls to Learn Coding Together!

1 Upvotes

**##**Looking for 2nd-Year B.Tech CSE Girls to Learn Coding Together!

Hi everyone!

I'm a 2nd-year B.Tech CSE student from India, looking for 2–3 girls who are also pursuing B.Tech CSE or a related specialization and are at a similar beginner level.

A little about me:

  • Timezone: IST (India).
  • Availability: Mostly evenings; flexible on Sundays.
  • Stack/Languages: Currently learning Java. Interested in DSA, OOPS.
  • Experience Level: Beginner. Currently working on programming fundamentals, variables, data types, operators and basic coding problems.
  • Goal: To build strong programming fundamentals, practise consistently, track weekly progress, solve problems together and eventually build projects.

I'm not looking for experienced programmers. I'd prefer girls who are also starting their coding journey so that we can learn at a similar pace without competing with each other.

If you're a 2nd-year B.Tech CSE girl from anywhere in India and this sounds interesting, please comment or DM me. I'd love to connect!

Let's learn and grow together! ❤️


r/Coding_for_Teens • • 2d ago

Looking for 2nd-year B.Tech CSE girls in India who are beginners in coding and interested in learning Java, DSA and OOPS together.I want to create a small group of 3–4 girls where we can practise coding, share doubts, set weekly goals and track each other's progress.If you're also a beginner and

1 Upvotes

r/Coding_for_Teens • • 2d ago

Free coding and robotics classes for kids

0 Upvotes

What's stopping you from giving your child the best of education, right from your home.

Do book our free demo class and let your kid explore their interest.

Visit www.polleneducation.com

Or email us at [email protected]

Or drop your details on our whtsapp number -

+917508170805


r/Coding_for_Teens • • 3d ago

Title: Looking for someone who can help automate parts of a Discord-based game (Coding/Logic)

Thumbnail reddit.com
1 Upvotes

r/Coding_for_Teens • • 3d ago

I want to learn lua/luau as my first real coding language.

Thumbnail reddit.com
1 Upvotes

Please help


r/Coding_for_Teens • • 3d ago

DevCollab Day 1: Backend and frontend foundations are in place — looking for a WebSocket/Docker teammate

Thumbnail
reddit.com
1 Upvotes

r/Coding_for_Teens • • 3d ago

17 yrs old tech student from italy here, what do i have to learn to become a programmer?

Thumbnail reddit.com
1 Upvotes

r/Coding_for_Teens • • 4d ago

Looking for intelligent enviornment

1 Upvotes

Looking for Project Partners / Hackathon Teammates 🚀

Hey everyone! I'm an ECE student interested in embedded systems, robotics, AI/ML and software development.

I'm looking to connect with motivated students and developers who want to build real-world projects, participate in hackathons and work on innovative ideas.

I'm currently learning and building my technical skills, and I'm interested in collaborating on AI/ML, robotics, IoT, embedded systems, healthcare technology and open-source projects.

Beginners are welcome if you're genuinely interested in building something. Let's connect and build something useful!


r/Coding_for_Teens • • 4d ago

c programming partner

Thumbnail reddit.com
1 Upvotes

r/Coding_for_Teens • • 4d ago

Is there a lot of teens studying malware dev or hacking?

0 Upvotes

I was justed interested because I know that teenagers which study programming often want to be a hacker imagining they are Mr Robot but how much of them really study C/C++ and asm, write code themselves and can explain exploits. I would like to know how old are you and how long do you study programming and your level (maybe some pet projects which you've done and as much your educational details as you like to say).

Idk why but I have a theory that we have much more good teenager hackers today than we think because any Ai can explain you any exploit, plus github with literally any exploit with source code which you can use to learn.

And I just wanted to mention that the fact that you installed Kali Linux doesn't make you a hacker.

If its not hard for you I would ask to evaluate my English level because im studying English (im a russian speaker) and i would like to study abroad, like is it seen that im a foreign person or what?


r/Coding_for_Teens • • 4d ago

Python

Thumbnail reddit.com
1 Upvotes

r/Coding_for_Teens • • 5d ago

Need guidance

1 Upvotes

Hiiii,

I am a cse student I highly need guidance for my career

, like how I should start coding what I should do first and the next step .

If there is anyone willing to help please help.