Entradas

How to make eyes that follow the mouse in HTML

Imagen
Code of index.html : <!DOCTYPE html> <html lang="en" dir="ltr">   <head>     <meta charset="utf-8">     <link rel="stylesheet" href="style.css">     <title></title>   </head>   <body>   <div class="eyes">     <div class="eye">       <div class="ball"></div>     </div>     <div class="eye">       <div class="ball"></div>     </div>   </div> <script>   var balls = document.getElementsByClassName("ball");   document.onmousemove = function(){     var x = event.clientX * 100 / window.innerWidth + "%";     var y = event.clientY * 100 / window.innerHeight + "%";     //event.clientX => get the horizontal coordi...

Courses to learn C#

In the link that we provide below, you can find books and material to start programming in C#. There is also material for people with a more advanced level in this type of programming language. Download links: Download

Courses to learn Python

In the link that we provide below, you can find books and material to start programming in Python. There is also material for people with a more advanced level in this type of programming language. Download links: Download

How to make a Christmas animation in HTML

Imagen
Code of index.html : <!DOCTYPE html> <html lang="en"> <head>     <meta charset="utf-8">     <title>HAPPY NEW YEAR</title>     <style>         body {             background-color: #424f6f;         }         h1 {             color: white;             margin-top: 250px;             font-size: 50px;             text-align: center;         }     </style> </head> <body> <h1 id="messageLabel"></h1> <script> var message = "Ha...

How to do a Color Background Changer in HTML

Imagen
Code of index.html : <!DOCTYPE html> <html lang="en" dir="ltr">   <head>     <meta charset="utf-8">     <title></title>     <link rel="stylesheet" href="style.css">     <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.5.0/css/all.css">     <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>   </head>   <body>   <div class="btn"><i class="fas fa-cog"></i></div>   <div class="box">     <h2>Enter a color</h2>     <div class="box-c">       <div class="txtb">         <input type="text" placeholder="#000000" id="hex">         <div class="prev"></div>...

How to do a Hangman in Python

Imagen
Code: from random import * import sys player_score = 0 computer_score = 0 def start():     print('Let’s play a game of Hangman.')     while game():         pass     scores() def game():     dictionary = ['Hola','Adiós']     word = choice(dictionary)     word_length = len(word)     clue = word_length * ['_']     tries = 6     letters_tried = ''     guesses = 0     letters_right = 0     letters_wrong = 0     global computer_score, player_score     def guess_letter():         print()         letter = input('Take a guess at our mystery word:')         letter.strip()         letter...

How to do a Clock in Python

Imagen
Code: #!/usr/bin/env python # -*- coding: utf-8 -*- from Tkinter import* import time root = Tk() root.focus() root.title("Clock") root.config(cursor='watch') time1 = '' clock = Label(root, font=('ubuntu', 30, 'bold'), bg='#3C3B37', fg='white', bd=0) clock.pack(fill=BOTH, expand=1) def tick():     global time1     time2 = time.strftime('%H:%M:%S')     if time2 != time1:         time1 = time2         clock.config(text=time2)     clock.after(200, tick) tick() root.mainloop()