Repl Talk
A friendly platform to share and discuss all things
Updates from the team about the product
🐶Introduce yourself! 🐶
Hi everyone! ![waving]( Use this space to share anything you want to share with our community - your name, where you're from, what you program in, what brought you here... whatever you're comfortable with! Can't wait to get to know y'all. 💖 Katya
posted by katyadee (676) 2 days ago
DEVELOPER SPOTLIGHT #06: “Work with each other, not against one another.”
## Welcome to *another* (slightly late!) edition of our Developer Spotlight series! This week we sat down with the founder of the volunteering app [Questlin](,18-year-old Sam Miserendino. ![bag-and-hands]( **@katyadee**: Let’s start with the basics. Who’s Sam? **@samdevz**: Hi, I’m Sam. I’ve been programming since 9th grade. It’s always been my passion. There was as tudent at my school that I went to, and he was really involved in programming… He was making some popular apps, so that got me into it. I started with web development and a little bit of machine learning, and now I’m making apps and stuff. I use basically every day, or almost every day, usually to test code or get things running quickly. ![D8-vEVOWsAAKiF8]( I contacted Amjad in like…June I think? I was looking to do some work with you guys, or see how I could contribute in more meaningful ways, and he said unfortunately that there were so many interns this summer that they couldn’t take me, but we’re going to see if we can set something up next year, or maybe in the fall…so that’s really exciting for me. I’m just really excited about that opportunity—and also to talk to you! **@katyadee**: I actually had no idea! All I knew was about your involvement [WWDC](… and I was really curious about what that was like. **@samdevz**: Oh, that was really exciting! I applied for the first time to Apple’s WWDC conference… usually it’s pretty expensive to go, and you have to enter a raffle, but for students they have a scholarship and if you’re picked, you can go for free. So I applied, and I won! **@katyadee**: For people who might not know—what is WWDC? **@samdevz**: Sure, so WWDC is Apple’s Worldwide Developers Conference. Over 5,000 people go, including 350 scholars. The main event is the famous Key Note, where they announce new features and products. It’s the main event for Apple Developers. The best part of it is you can meet the people who created these products. They have sessions all day long, and labs. So you can walk up to the guy who designed the Mac or the iPhone or anything—and they’ll give you really good feedback on what **you** can do to improve! It’s really a great resource for developers. **@katyadee**: What was it like to go as a student? **@samdevz**: They did a lot of cool stuff for us… you get to go to all the events—you’re like a regular attendee—you get to watch the Key Note, and you also get to meet with people who have similar interests, or executives who are doing the kinds of things we’re doing, but at a higher level. I also had the opportunity to meet with this executive named Lisa Jackson. She kind of manages the environmental concerns at Apple and the social concerns—that kind of ties in with what I’m doing. I make a lot of volunteering-oriented apps, that are designed to help people. That was really cool. **@katyadee**: Did you have a favorite part? **@samdevz**: Oh my god…So much. So, I had a friend there. I make apps and he makes games. We got the chance to meet with Apple’s marketing team, and I thought that was really valuable. They actually sat down with us one on one, and gave us suggestions on how to improve our presence on the App Store, how to market better, all sorts of different tips…like on how to monetize, for example. In general, it was so cool to meet the people who run the App Store. **@katyadee**: What was some of the best advice that they gave you? **@samdevz**: You always want to have an engaging page on the App Store. Screenshots on your app are important, but so are preview videos. Those keep people engaged. Also make sure your reviews are good, and respond to the reviews you do get. They also talked about monetization and different ways to make money… One of the best ways to make money is really ads. Not a lot of people will spend money in-app if your app is new. So, they walked us through how to get started with ads and that was really helpful, too. **@katyadee**: Wow—that’s really dedicated. I’m surprised to hear how available they were to help people. So, we’ve talked a bit how you’re an app developer… could you tell me a bit more about your background with that? **@samdevz**: The main app I’ve developed is called [Questlin]( and it’s an app to help people find places to volunteer near by. That project is really important to me, because my school, we’re required to do service every year. And every year, I’d been kind of doing the physical side of volunteering… but at one point, I was speaking to this executive at this non-profit I go to a lot, and I was asking him about different ways to volunteer. ![Screen Shot 2019-06-14 at 6.47.16 PM]( And then he was like, here’s what we can use actually: an app that can help us keep track of volunteers and volunteering. I started working on Questlin from there. It’s been really cool and it’s gotten some attention. Recently, I even got to meet [Congresswoman Bonnie Watson Coleman]( **@katyadee**: Whoa. That’s really amazing. I’d love to hear more about how that happened. **@samdevz**: Well, we entered this thing—it’s actually really great for students and I encourage everyone to enter. It’s called the [Congressional App Challenge]( Basically, you create an app within your district, and then your representative reviews your app. You get to go to Congress, and meet congresspeople… A lot of them will even download your app. That was a really valuable experience, and I’m really glad I did that. We’re getting more and more downloads. There’s a place in New Jersey using it… **@katyadee**: Let’s back up a second… Is Questlin for keeping track of volunteers, or is it more consumer-facing? **@samdevz**: It’s actually both! There’s a portal for non-profits and for volunteers. The biggest challenge has been expanding. The way I designed it, it’ll only show places nearby, so for a lot of people it’s not really that useful right now, it’s more useful in certain places than others. That’s been a big obstacle. **@katyadee**: Could I download it here in Austin and use it, or have you only rolled out to certain markets? **@samdevz**: Unfortunately, right now we have to manually add non-profits. We’re trying to make it more automatic, though. We’re working on a better version of it. When I won the challenge, it became a featured app in the App Store and it got a lot more downloads, and we got a lot of complaints that users couldn’t use it where they are. But some non-profits have reached out to us, so we’re working on fixing these things now. **@katyadee**: Those are pretty exciting obstacles to have, though! **@samdevz**: There was so much more interest than I expected, it really just started off as this small thing at my school. I never anticipated people from different places would use it, or an audience this large. Now we’re working to catch up with the demand now. **@katyadee**: You know, it sort of reminds me of… I can’t actually remember the name of it. There’s like a website I would use—I mean, this had to be 10 years ago, now—to find volunteer opportunities… I wish I remembered the name, it would make my point more salient. But I guess my question was going to be how you were different from other, existing and similar products. Maybe my inability to remember them says it all, though. **@samdevz**: *(laughing)* VolunteerMatch, Mobile Serve? **@katyadee**: You know what—yeah, I do think it was VolunteerMatch. How would you say you’re different from them? **@samdevz**: Well, we’re an app. We want to integrate VolunteerMatch’s API. **@katyadee**: That’s awesome that you guys are working together. **@samdevz**: It’s a nice space to work in because everyone wants to work together, instead of against one another.
posted by katyadee (676) 9 days ago
😎App of the Week😎: Kognise's FontKey
This week's App of the Week is simple—press your space bar, and get a served a new font. The idea is to broaden your horizons... beyond Montserrat, beyond Roboto, beyond Lato. Sometimes the simplest apps are the best. ![media]( Check it out [here]( Shout out to @Kognise for the great work!
posted by katyadee (676) 10 days ago
🚨NOT A DRILL🚨: WIN $5,000! We're having another competition!
### Friends, foes, loyal Replers, Boy do I have some news for y'all! On July 1st, we're kicking off another competition and the stakes are higher than ever. ![richrichrich]( **Types of programs accepted:** *Any.* Theme TBD. **Rules:** As always, *must* be original content & MUST be created *and* hosted on **Prizes:** $5,000, $2,500, and $1,000 **Dates:** July 1 @ 00:00 PST to July 21 @ 00:00 PST Keep your 👀on [this page]( for more info & our theme announcement! I am so pumped about this! This is our biggest one yet!
posted by katyadee (676) 2 days ago
SPACE challenge results!
It was so much fun seeing all your submissions for the space contest! All entries were put up on a pretty huge screen at's HQ - and it was really cool looking at your creations changing and being new every time we looked at them. As you might've seen on twitter - @kognise's won! It's something that met the challnges' requirements, was fun to play with - and on top of that super useful too! I used it a couple of times to decide fonts for my projects already✨ Some other submissions I really liked: - @eankeen's [XKCD Viewer]( - @fmahaztra's [Exoplanet Generator]( - @RileyWalz's [Excursion]( - @ArchieMaclean's [Cellular Automata]( - @pyelias's [Cool Fractals]( I'm looking forward to see y'all submit even more entries to our next, *huge* contest 👀
posted by jajoosam (535) 2 days ago
See more posts
Ask coding questions
Guide to Asking Coding Questions
# **Guide to Asking Coding Questions** ## **Why?** Good questions help your question be solved faster, and people will want to answer your question Bad questions waste time, you will often not get answers that you asked for, and people will often ignore your questions ## **Quick Questions Guide** ### Do This - Always ask your questions in English - Explain what you want the code to do - Explain what the code does - Include error messages - Share the repl with the line numbers - When you figure out the answer, update your post - Put the repl link, instead of pasting code ### Don't Do This - Don't post homework questions - Don't use caps in the title - Don't use words like 'HELP' or 'PLEASE' in the title - Don't post questions that already have an answer (Search Box) - Don't post feedback or bugs on Talk, use []( for feedback, or []( for bugs ## **Steps For Better Questions** 1. Understand the code - Read your code and figure out what each line does - If a concept is unfamiliar, Google it - You can also use a debugger to help you 2. Describe the problem - Explain what you want the code to do - Explain what the code does (error messages) 3. Provide the code - Share a repl that has your code - Share the line number(s) of your code issue - Make sure that the code you shared has the issue 4. Format code consistently - Make sure your code is easy to read 5. Check for typos - Make sure the code does not have any typos that would cause the problem 6. Explain what you did to troubleshoot the problem - Make a list of what you think the problem is and try to fix your problem by going through the list 7. Make a guess on what you think the problem might be - Use the list from the previous step 8. Proofread the question - Make sure you provided everything - Clear all confusions that you think there might be 9. Update people on the question - If you figured out the answer, edit the post to tell people - When you get an answer, fully understand it - Be nice to people who answer your question - Remember that the people wanted to answer your question, but didn't have to 10. Things to NOT do - Don't post homework questions - Only post questions in English - Do not use caps in the title - Do not use "HELP" or "PLEASE" in the title - Don't post questions that have already been answered (Use search box) - Don't post feedback or bugs on Talk, use []( for feedback, or []( for bugs ## **Example:** ### **Question** We have some Python code with an error: [repl]( ```python rannumexe = int(input()) if rannumexe = 1: print('hi' + rannumexe) ``` ### Step 1 We show what each line does using comments. ```python rannumexe = int(input()) # Asks the user to input a rannumexe if rannumexe = 1: # If the rannumexe equals 1 print('hi' + rannumexe) # Print hi and the rannumexe ``` ### Step 2 We want the code to input a number, and if the number is one, print "hi" and the number. Our problem is that we have an invalid syntax error on line 2 in the file. ``` File "", line 2 if rannumexe = 1: ^ SyntaxError: invalid syntax ``` ### Step 3 Our repl with the issue is located [here]( We have an issue on line 2 ### Step 4 We can change "rannumexe" to "number" to clear confusion ```python number = int(input()) # Asks the user to input a number if number = 1: # If the number equals 1 print('hi' + number) # Print hi and the number ``` ### Step 5 We don't have any typos ### Step 6 Our problem could be that we improperly used the if statement ### Step 7 The problem could be about using the if statement incorrectly ### Step 8 Our final question: Title: Invalid syntax error about equal signs Content: I have an invalid syntax error on line 2 in the file of this [repl]( The program should take a number as an input, check if the number is equal to one, and if so, print "hi" and the number. The error point to the equal signs and I think this issue is with the incorrect syntax of the if statement. Help is appreciated :). ```python number = int(input()) # Asks the user to input a number if number = 1: # If the number equals 1 print('hi' + number) # Print hi and the number ``` ``` File "", line 2 if rannumexe = 1: ^ SyntaxError: invalid syntax ``` Steps based on Gordon Zhu's [post]( If you have any suggestions or feedback, post it in the comments below.
posted by Mosrod (249) 9 months ago
⛈Brainstorm ⛈What should we code?
The last time I had one of these threads, we got a lot of cool answers. So... let's kick this off again! What should we code? What should I, Katya, code?
posted by katyadee (676) 2 days ago
What's your most impressive repl?
What's the coolest repl you've ever created? For me, easy - it's any of the newsletters.
posted by katyadee (676) 1 day ago
Daily Question #7: What is your most important possession?
Nobody posted on my Daily Question yesterday, however, i am hoping to change that with today's question! What is your most important Possesion? Mine is my books. I don't really take anything to heart, apart from books. Books let me travel to a different world when things get harsh in my own eyes. Meme of the day: ![image](
posted by ReshiramWolfu (50) 2 days ago
What line of code describes you best? 🤔
Okay, I lifted this from Quora, but I thought it was a really cool question with lots of ways to interpret it! What line of code describes y'all best?
posted by katyadee (676) 8 days ago
See more posts
Learn to Code via Tutorials on
🌚🕶 How to Enable Site-Wide Dark Theme 🕶🌚
# Site-Wide Dark Theme Do you like not being blinded while browsing Well me neither! ![Repl talk on dark theme]( *** First, you might not have the editor dark theme enabled, so make sure you enable that. 1. Click the settings button at the left of the editor screen. ![Settings Button]( 2. Find the theme dropdown, and select *dark* ![theme dark]( *** Now that you have the editor dark theme enabled, we will enable the site-wide dark theme. 1. Download Tampermonkey for [Chrome]( or [Firefox]( 2. Choose a theme from [the list of themes]( or [create your own]( 3. Click the `install` button. 4. Upvote and post a comment on this tutorial. 5. Profit!
posted by mat1 (2205) 2 months ago
🚀 A Starter Guide to Pygame 📀
# 🚀 A Starter Guide to Pygame 📀 Pygame is an open-source library for making graphical applications with Python. Learn more about it on the official [website]( This tutorial is intended to help you setup a very basic Pygame interface. It's for Python beginners or people who want to quickly bootstrap a Pygame project. Find more about's GFX public beta announcement [here]( So let's get started! We're going to be building a simple screen saver. The final result will look like the following ![programProgress4]( ## Starting out When creating a new project, be sure to select "PyGame" when creating a project. ![image]( Now we're ready to start writing some code! ## Painting the Screen Red 🎨 First, we're importing Pygame and initializing all the imported pygame modules with [`pygame.init()`]( Second, we're declaring `width` and `height` variables that represent the size of the screen. Third, we're setting `backgroundColor` to a tuple of 3 elements that represent the RGB numbers. Fourth, `screen` is a display Surface, or an initialized window or screen for display with the [`set_mode()`]( method. Lastly, in the infinite loop, we're filling the screen to the `backGroundColor` and updatiang the display Surface to the screen. In other words [`pygame.display.flip()`]( "refreshes" the screen with changes you made to the grahpics. ```python import pygame pygame.init() width, height = 800, 600 backgroundColor = 255, 0, 0 screen = pygame.display.set_mode((width, height)) while True: screen.fill(backgroundColor) pygame.display.flip() ``` So, we get a red background! ![programProgress1]( ## Adding the DVD Right before you while loop, import an image of your DVD. Feel free to use the same image I used, in the repl below. ```python dvdLogo = pygame.image.load("dvd-logo-white.png") ``` Then, create a rectangle from the Surface, or from the image you just loaded with [`get_rect()`]( ```python dvdLogoRect = dvdLogo.get_rect() ``` Now, inside of the `while` loop (after filling the background color), "map" the imported image to the `dvdLogoRect` rectangle using the [`blit()`]( method. That way, the image stays inside of the invisible `dvdLogoRect` rectangle. ```python screen.blit(dvdLogo, dvdLogoRect) ``` Now, we get a DVD! ![programProgress2]( ## Moving the DVD Logo To move the DVD logo, simply use `move()` by a speed: ```python dvdLogoRect = dvdLogoRect.move(dvdLogoSpeed) ``` Make sure you also declare and initialie dvdLogoSpeed at the top of the file. `dvdLogoSpeed[0]` represents the speed in the `x` direction. ```python dvdLogoSpeed = [1, 1] ``` Finally, I added a `time.sleep(10 / 1000)` so the logo moves slower. So my code ended up looking like ![programProgress3]( The DVD logo *will* move off the screen because there is no bouncing. To implement a check for bouncing, add the following: ```python if dvdLogoRect.left < 0 or dvdLogoRect.right > width: dvdLogoSpeed[0] = -dvdLogoSpeed[0] if < 0 or dvdLogoRect.bottom > height: dvdLogoSpeed[1] = -dvdLogoSpeed[1] ``` The `.left` and `.right` properties don't seem to be [documented](, but it's implied that `.left` measures the distance from the left part of the `dvdLogoRect` Rect (rectangle) to the left part of the `screen.` And so on and so fourth for `.right`, `.top`, and `.bottom`. Here is the final result ![programProgress4]( Now let me know when the logo hits the corner!
posted by eankeen (501) 4 months ago
How I solved the Secret Announcement
# A Detailed Solution to Secret Announcement ### Background: You are most likely busy creating a game for the game jam and you probably know that an announcement came 2 weeks before the jam as a secret message using [steganography]( I was one of those chaps who actually solved the secret, but didn't do anything. The challenge can be found [here]( There was a solution, but that was not very explanatory.This post will explain how ~I~ solved the announcement. This post assumes basic knowledge of the binary system. *** The first thing I did after seeing the newsletter was to read up on steganography.I found this on wikipedia: >Concealing messages within the lowest bits of noisy images or sound files Interesting... ## Reverse Engineering: Then, I looked at the code.Apart from imports and loops to go through all pixels,this was the crux of the code: ```py secret_red = secret_pix[0] >> shift_amt secret_green = secret_pix[1] >> shift_amt secret_blue = secret_pix[2] >> shift_amt public_red = public_pix[0] & all_except_LSB_mask public_green = public_pix[1] & all_except_LSB_mask public_blue = public_pix[2] & all_except_LSB_mask final = ( secret_red + public_red, secret_green + public_green, secret_blue + public_blue ) ``` `>>` and `&` are [binary operators]( was 7 and all_except_LSB_mask was 254 What does the >> operator do? It shifts the bits towards towards right.For example: `11100010101 >> 6` outputs `11100` i.e. the last 6 bits are removed. In our case, all the 8 bit data(because 255 is the maximum in RGB color format and 255 is 8 bits) is shifted by 7 bits so that would leave only the highest bit as one or zero. This would also imply that anything greater than 127.5 (255 / 2) would leave 1 while anything lesser would leave zero. `10101010 >> 7 == 1` `01010000 >> 7 == 0` So that's our secret pixel Then, we see the `&` operator with all_except_LSB_mask as 254.The & operator is called bitwise and. Basically, it returns one only if both expressions are one.Like `1&1 == 1` `1&0 == 0` `0&0 == 0` An important property of the & operator is that `something & all 1s = something` another one is that `something & 0 = 0` `10100100`&`11111111`==`10100100` 254 in binary is `11111110` So,all the bits except the last one would remain intact `10011011 & 11111110 ==10011010` So,this would turn all public pixels into even numbers as the last bit is 2**0=1 and if it is absent, the number must be even. The final pixel is secret_pix + public_pix.We know that public pix is either 0 or 1.Since the last bit of public pix is always zero,The last bit of final pixel must reflect the secret image. So here's my code: ```py from PIL import Image'out.png').convert('RGB')'RGB',(600,600)) for x in range(600): for y in range(600): secret.putpixel((x,y),tuple((i%2)*255 for i in public.getpixel((x,y))))'secret.png') ``` All the juicy stuff is in one line:`(i%2)*255 for i in public.getpixel((x,y)` What this does is: + take the public pixel + compute modulo two (returns 1 if odd and 0 if even) + multiply that by 255 because 00000001 or 00000000 show no visible difference but 11111111 and 00000000 do + put this in the secret image, pixel by pixel And Heres my output: ![secret]( waow indeed
posted by Lord_Poseidon (108) 3 months ago
# What is a bookmarklet? A bookmarklet is similar to an extension, but is used by clicking a bookmark. According to wikipedia: > A bookmarklet is a bookmark stored in a web browser that contains JavaScript commands that add new features to the browser. Bookmarklets are unobtrusive JavaScripts stored as the URL of a bookmark in a web browser or as a hyperlink on a web page. Bookmarklets are usually JavaScript programs. Regardless of whether bookmarklet utilities are stored as bookmarks or hyperlinks, they add one-click functions to a browser or web page. When clicked, a bookmarklet performs one of a wide variety of operations, such as running a search query or extracting data from a table. For example, clicking on a bookmarklet after selecting text on a webpage could run an Internet search on the selected text and display a search engine results page. # Create a bookmarklet Creating a bookmarklet is easy. (If you do know how to create a bookmark. If not read [Creating A Bookmark]( ) Let's create a simple example: First, create a bookmark. As for the title of the bookmark, name it “Hello World”. Instead of keeping the url of the page as the bookmark type `javascript:alert(‘Hello World!’)`. There! Click save or whatever it is in your search engine. And click the bookmark. You should have an alert message saying “Hello World!” appear! To run js in a bookmark, you need to have the `javascript:` prefix before it. You can only type one line so make sure to use your semicolons! In addition, you **can not use double quotes**. The search engine saves the bookmark in code that looks something like this: ```html <a href="javascript:alert(‘Hello World!’)">Hello World</a> ``` If you use double quotes it looks like: ```html <a href="javascript:alert(“Hello World!”)”>Hello World</a> ``` And causes an error. If you have multiple lines, create an anonymous function: `javascript:(function(){ var x=prompt(‘Hi say something:’); alert(‘You said: ’ + x); })()` Notice there are NO double quotes. Let's go over some examples: Google Search: `javascript:(function(){''+prompt('Google Search:', '').split(' ').join('+'), '', 'width=800,height=500,left=10,top=10,scrollbar=yes');})();` The above example opens up a new window with a search query of your input! Feel free to copy any of these or the ones listed below. Calculator: `javascript:(function(){var evl,expr=prompt('Formula...','');with(Math)try{evl=parseFloat(eval(expr));if(isNaN(evl)){throw Error('Not a number!');}prompt('Result of '+expr+':',evl)}catch(evl){alert(evl);}})();` @JSer ‘s Rolling Sky: (Thanks for creating such an awesome game!) `'', '', 'top=15,left=15,scrollbar=yes,width=500,height=600')` # Community Creations @Zavexeon **Faces Generator** > uhm... it works.... and is also useless... ```js javascript: const faces = ['OwO ', 'UwU', 'TwT', '>w<', '^w^']; let face = faces[Math.floor(Math.random()*faces.length)]; document.write('<body style=\'background-color: black;\'></body><title>' + face + '</title><p style=\'text-align: center; font-size: 500px; font-family: Arial; color: white;\'>' + face + '</p>'); ``` ** Thank you for reading! Please upvote and comment your own bookmarklets, to be added to the community creations section! I hope I get a content creator tag for this 😀 **
posted by PYer (2043) 2 months ago
LLC - Java
# Language learning club - Java ### Introduction Thanks to the []( team (especially @amasad and @katyadee), we now have a language learning club about which you can learn more [here](<>). We recently had a voice session for [GoLang]( and it was pretty dull and I didn't want that to happen again. So I decided to contribute to the people learning Java myself. There is going to be a session over voice chat on the discord server at 06:00 PM CST on Mondays. You can join the discord server by [clicking here]( ------ ### For Beginners Now that all the info has been shared, here are some resources you can use to get started with Java: - For book lovers: - - [Java: A Beginner's Guide]( - [Effective Java]( For YouTube video lovers: - - [Java tutorial for beginners video series]( - [Another Java tutorial for beginners (9 hour video)]( ------ ### GUI Development with Java For people who have learned the basics of Java, here are a few YouTube videos that you can watch to learn GUI development with Java. For people who like to read: - - [Java Swing Tutorial]( - [Swing Tutorialspoint]( For people who like videos: - - [Complete Java Swing tutorial]( - [Java Swing tutorial video series]( ------ ### Android App development For people who even know about Swing. Java is the most used language for mobile apps development in [Android Studio]( [Click here to learn about Android App development]( Here you'll find that there is a new alternative to Java - `Kotlin`. And it also seems like a sweet choice. You can compare the differences between Java and Kotlin [here]( ------ ### Some code examples ***Note:*** *In all the examples the file was named as `` which is the default in []( Also, the following examples use the simplest ways possible, these programs could've been made much smaller (except for the first one).* **Hello World** ```java /* This program is basically the boilerplate for the language*/ class Main { public static void main(String[] args) { System.out.println("Hello world!"); } } ``` ------ **Hello <name>** ```java // Importing the scanner class for taking input import java.util.Scanner; class Main { public static void main(String[] args) { // Declaring the variables String name; Scanner in = new Scanner(; // Getting the name System.out.println("What's your name?"); name = in.nextLine(); // Printing the name System.out.println("\nHello, " + name); } } ``` ------ **Factorial** ```java // Importing the Scanner class for taking input import java.util.Scanner; class Main { public static void main(String[] args) { // Declaring the variables int n, factorial = 1; Scanner in = new Scanner(; // Getting a number from the user. System.out.print("Please enter a number: "); n = in.nextInt(); // Calculating the factorial using a simple for loop for(int i = 1; i <= n; i++) { factorial = factorial * i; } // Showing the calculated factorial System.out.println("\nThe factorial of " + n + " is " + factorial); } } ``` ------ That's all for now. Visit the above links and learn more for yourself! :P
posted by TheDrone7 (499) 2 months ago
See more posts
Share your repls and programming experiences
Rules for Posting - Read me!
Some rules and guidelines to keep in mind as you share your great work on our boards: 1 - Be kind and courteous to others 2 - Make sure that any feedback you provide is constructive. 3 - Outside links are allowed, but you must provide the source. Ideally, things that you post will have been created on 4 - Avoid posting overly promotional material - the focus is, and always will be, a programming, learning, and collaborative community. :) 5 - Don't spam! Keep things SFW (Safe For Work). We may revoke your access to these boards if you are found to be in violation of any of these rules. Feel free to ask clarifying questions. Last updated 7/10/18 12:09 PST
posted by timmy_i_chen (925) 12 months ago
Click this post to get logged out of!
# :) ![Logout]( How it works: It's literally just an img tag that links to
posted by mat1 (2205) 7 hours ago
👀 Domain Hack Finder 👀
# Domain Hack Finder Ever want to make a website, but you haven't been sure what you should name it? According to Wikipedia, a domain hack is a domain name that suggests a word, phrase, or name when concatenating two or more adjacent levels of that domain. For example, "bir.ds" and "examp.le", using the fictitious country-code domains .ds and .le, suggest the words birds and example respectively. In this context, the word hack denotes a clever trick (as in programming), not an exploit or break-in (as in security). Learn more about [domain hacks on my blog]( ![Domain Hack Finder]( [Try it out now! 😎]( (Upvote this post for free Robux or MineCoins or whatever!)
posted by mat1 (2205) 11 days ago
brayden liakimatagi
code 100101001010101010101001001010101010101010101010101010101010101010101010101011101101010101010101010110101010101011010101100101001010101010101001001010101010101010101010101010101010101010101010101011101101010101010101010110101010101011010101100101001010101010101001001010101010101010101010101010101010101010101010101011101101010101010101010110101010101011010101100101001010101010101001001010101010101010101010101010101010101010101010101011101101010101010101010110101010101011010101100101001010101010101001001010101010101010101010101010101010101010101010101011101101010101010101010110101010101011010101100101001010101010101001001010101010101010101010101010101010101010101010101011101101010101010101010110101010101011010101100101001010101010101001001010101010101010101010101010101010101010101010101011101101010101010101010110101010101011010101100101001010101010101001001010101010101010101010101010101010101010101010101011101101010101010101010110101010101011010101100101001010101010101001001010101010101010101010101010101010101010101010101011101101010101010101010110101010101011010101100101001010101010101001001010101010101010101010101010101010101010101010101011101101010101010101010110101010101011010101100101001010101010101001001010101010101010101010101010101010101010101010101011101101010101010101010110101010101011010101100101001010101010101001001010101010101010101010101010101010101010101010101011101101010101010101010110101010101011010101 there you go, people, of earth.
posted by BraydenPabst (1) 6 hours ago
Hi! I've spent the past few days working on my submission, FontKey. I aimed to create something that both satisfies the requirements and is a useful tool people might use day-to-day. **Let's get to the meat.** What does it do? Simple, FontKey helps you find new fonts. If you've heard of Roboto, Open Sans, Lato, and Montserrat, you'll know that these fonts are at the top. And the sad thing is, most websites keep using them. When you press space, FontKey will pick a new font for you. You can try out font pairs and if you like one side of a pair you can lock it in place. But it does much more than that! You can **preview your fonts in realistic layouts,** and if you want to collaborate with someone else just **click a button to get a sharing link.** For example, [here's one](! You can also **get code for your site** in a click. What else? Well, I made a cheesy promo video. You know - bouncy background music, lots of editing. Click [here]( or watch it on the site. Finally, there's auto mode. It'll automatically switch fonts in a fullscreen page every 5 seconds. It's there because it looks cool - and would make a nice screensaver. ## Closing First and foremost, [here's a link to FontKey]( It's probably at the bottom too. I'd appreciate any feedback! I'm thinking I might eventually launch this on Product Hunt as well. ![FontKey: A modern way of finding fonts.](
posted by Kognise (199) 13 days ago
See more posts