Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Fun activity Say hello... in a coding language!

Hello Coders!

Let's do something fun! This is supposed to be a fun way for us as a community to engage and learn from each other.

Okay, here's how it goes. You can decide what language you want to use, and all you have to say is "Hello, (person above)!" in the language that you picked ([UWSL][UWSL][UWSL]Using the BBCode function)[/UWSL][/UWSL][/UWSL].
So here's an example
C++:
std::cout << "Hello, Master Yoda";
std::cout << "Hello, Master Yoda";
 

“Hello, World!” page in Ruby on Rails:​


1. Create a new Rails application


Code:
rails new hello_world_app
cd hello_world_app

2. Generate a controller

Code:
rails generate controller Home index<br>

3. Set up the route

Open the config/routes.rb file and set the root route to the index action of the Home controller:

Code:
rails generate controller Home index<br>


4. Edit the controller

Open the app/controllers/home_controller.rb file and ensure the index action looks like this:

Ruby:
class HomeController < ApplicationController
  def index
    render plain: 'Hello, aditya63941 (The guy above me)!'
  end
end


5. Start the Rails server

Code:
rails server<br>

6. View your “Hello, World!” page

Open your web browser and go to http://localhost:3000. You should see “Hello, aditya63941” displayed on the page.
 
Last edited:
``
Python:
char_array = ['H', 'e', 'l', 'l', 'o']
result_string = ""
for char in char_array:
    result_string += char
result_string += '!'
print(result_string)
 

New Threads

Latest posts

Buy us a coffee!

Back
Top Bottom