-
Create a Python program that asks the user to tyep their age in years, and the program will convert and print their age in months.
-
Create a Python program that asks the user to type their age in months, and the program will convert and print their age in years.
-
Create a Python program to check the complexity of a password: It should ask the user for a word and verify the word contains a lowercase letter, an uppercase letter and a number.
-
Write a Python program that takes a number from the user and print the word "Boom" if that number divides by 7 or contains the digit 7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
import sys | |
from typing import NewType | |
BPResult = tuple[int, int] | |
BPNumber = NewType('BPNumber', int) | |
ALL_OPTIONS = [n for n in range(1000, 99999) if len(str(n)) == len(set(str(n)))] | |
def guesses(): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
evenings_ok=( | |
"Pesach I" | |
"Pesach VII" | |
"Shavuot I" | |
"Tish'a B'Av" | |
"Rosh Hashana II" | |
"Yom Kippur" | |
"Sukkot I" | |
"Shmini Atzeret" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE test (x integer, y integer); | |
INSERT INTO test(x, y) VALUES(10, 20); | |
INSERT INTO test(x, y) VALUES(10, 20); | |
INSERT INTO test(x, y) VALUES(10, 20); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns reagent-useeffect-demo.core | |
(:require | |
[reagent.core :as r] | |
[react :as react] | |
[cljs.core.async :refer [go]] | |
[cljs.core.async.interop :refer-macros [<p!]] | |
[reagent.dom :as rdom])) | |
(defn use-pokemon [id] | |
(let [[data set-data] (react/useState {}) |
[ ] Create a first Vue app in Vite. Change the text to show your name.
[ ] Change the background color to a color you like
[ ] Add a new component that prints Hello <your name>
.
Add it to the page multiple times to see the message repeated.
[ ] Add a new component that shows an image.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# App port to run on | |
PORT=3000 | |
# The name of the site where Kutt is hosted | |
SITE_NAME=Kutt | |
# The domain that this website is on | |
DEFAULT_DOMAIN=localhost:3000 | |
# Generated link length |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule Day22_2 do | |
def read_input do | |
File.read!("input/day22.txt") | |
|> String.split("\n\n", trim: true) | |
|> Enum.map(fn deck_str -> | |
deck_str | |
|> String.split("\n", trim: true) | |
|> Enum.drop(1) | |
|> Enum.map(&String.to_integer/1) | |
end) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule Day21 do | |
def read_input do | |
File.read!("input/day21.txt") | |
|> String.split("\n", trim: true) | |
end | |
def ingredients_list(line) do | |
[ingredients_str, _alergens_str] = String.split(line, [" (contains ", ")"], trim: true) | |
String.split(ingredients_str, " ", trim: true) | |
end |
NewerOlder