instruction
stringlengths
2
259
⌀
input
stringlengths
0
442
⌀
output
stringlengths
1
1.9k
⌀
text
stringlengths
273
2.08k
⌀
Write a function in Ruby to remove the white space from a given string.
def remove_whitespace(str) str.gsub(/\s+/, "") end
null
null
null
null
Ondra (počítač) Ondra SPO 186 je československý osmibitový počítač vyvinutý v roce 1985 v Tesle Liberec Ing. Eduardem Smutným, Ing. Tomášem Smutným a Ing. Janem Merclem pro použití ve školách a domácnostech. Jméno je odvozeno od křestního jména syna Ing. E. Smutného, který trpěl mozkovou obrnou a práce s klávesnicí mu...
Create an array of 8 string objects in JavaScript with different values.
var stringArray = ["word1", "word2", "word3", "word4", "word5", "word6", "word7", "word8"];
null
Describe what is polymorphism in Java.
In Java, polymorphism is a programming concept that allows the same code to be used to perform different tasks. This is achieved by assigning different behaviors to different objects that share a common base class. Thus, when a method is invoked, the runtime determines which version of the method should be executed by ...
null
Kolik je 10 - 8?
10 - 8 = 2
null
null
null
null
Veratrum Veratrum is a genus of flowering plants in the family Melanthiaceae. It occurs in damp habitats across much of temperate and subarctic Europe, Asia, and North America. Veratrum species are vigorous herbaceous perennials with highly poisonous black rhizomes, and panicles of white or brown flowers on erect stem...
null
null
null
Bee vac A bee vac is a type of vacuum cleaner, factory-made or home-made, designed to suck up live honeybees without killing or damaging them. It can be used to remove bees when capturing a feral colony, or where a swarm has settled. It uses a solid reception bin, not a dustbag. The reception bin may be cylindrical or...
Write a code to get the top 10 trending topics on Twitter with their volume using the Twitter API.
""" Get the top 10 trending topics on Twitter with their volume using the Twitter API """ import tweepy #Authenticate to Twitter auth = tweepy.OAuthHandler("CONSUMER_KEY", "CONSUMER_SECRET") auth.set_access_token("ACCESS_KEY", "ACCESS_SECRET") #Create API Object api = tweepy.API(auth) #Get top 10 trending topics trends...
null
Implement a simple password validator in Java.
password = "Password1"
public class PasswordValidator { public static boolean validate(String password) { if (password.length() < 8) { return false; } boolean containsUpperCase = false; boolean containsLowerCase = false; boolean containsDigit = false; for (int i = 0; i < password.length(); i++) { char c = password.charAt(i); if (Character.is...
null
Summarize key facts about „Susan Parkinson“ clearly and accurately.
**Susan Parkinson** Susan Parkinson (8 January 1925 – 15 October 2012) is best known as an English potter and for her work with the Arts Dyslexia Trust. Early life and education She was born Susan Elizabeth Sanderson in Calcutta (Kolkata). Her father was a wine merchant with an interest in sport and natural history, w...
null
null
null
null
1. divisjon 1967 1. divisjon 1967 byla nejvyšší norskou fotbalovou soutěží v sezoně 1967. Vítězem se stal a do Poháru mistrů evropských zemí se kvalifikoval tým Rosenborg BK z Trondheimu, druhý Skeid Fotball si zajistil účet ve Veletržním poháru. Účast v Poháru vítězů pohárů si zajistil poražený finalista poháru FK Ly...
Summarize key facts about „Joyce Kalu“ clearly and accurately.
**Joyce Kalu** Joyce Kalu (born 25 September 1970) is a Nigerian actress, film producer and director in the Nigerian Film Industry. Biography Joyce Kalu was born on 25 September 1970 in Ohafia, Abia State, South Eastern Nigeria. The last daughter in a family of nine, she is now married with three children. Education K...
null
null
null
null
Coal mining in Brazil Coal mining in Brazil is the country's largest source of non-renewable energy, and is an important part of Brazil's energy economy. Brazil is the tenth largest energy consumer and the third largest in the Western Hemisphere. Coal accounts for approximately 5.8 percent of the country's total prima...
PHP: bezpečné načtení POST jména.
```php <?php $name = trim($_POST["name"] ?? ""); if ($name === "") { http_response_code(400); echo "Chybí jméno"; exit; } echo htmlspecialchars($name, ENT_QUOTES, "UTF-8"); ```
null
null
null
null
Diamond FM (Ilorin) Diamond FM (88.7 MHz) is a radio station in Ilorin, Kwara State, Nigeria. The station began operating on 22 December 2020. In 2021, the launch of a sister television channel, Diamond TV, was announced. References External links Radio stations established in 2020 Radio stations in Nigeria Privately ...
Summarize key facts about „Augustus Johnston“ clearly and accurately.
**Augustus Johnston** Augustus Johnston (ca. 1729 – 1790) was an Attorney General in the Colony of Rhode Island and Providence Plantations from 1758 to 1766 and is the namesake of Johnston, Rhode Island. He also served briefly as a stamp distributor during the controversial Stamp Act 1765 protests and later fled Rhode...
null
Sum all the numbers divisible by 3 and 7 in the list.
[27, 21, 63, 77, 49]
84
null
How can the following C code for Fibonacci Series be modified to include the nth element?
#include <stdio.h> int Fibonacci(int n) { if (n <= 1) return n; return Fibonacci(n-1) + Fibonacci(n-2); }
#include <stdio.h> int Fibonacci(int n) { int a = 0, b = 1, c; if (n == 0) return a; for (int i = 2; i <= n; i++) { c = a + b; a = b; b = c; } return b; }
null
Output the following string after applying a base64 encoding.
String: Hello World!
SGVsbG8gV29ybGQh
null
Stručně shrň článek o tématu „Sobi táhnou“ a uveď hlavní fakta.
**Sobi táhnou** Sobi táhnou (1935, Reindeer Trek) je dobrodružný román kanadského spisovatele Allena Royho Evanse, líčící pětiletý přesun obrovského stáda sobů na dalekém severu. Jde o autorovo nejznámější dílo, někdy vydávané pod názvem Maso (Meat). Obsah románu V románu je popsán pětiletý přesun (odehrál se v letech...
null
Write a Python function `retry` that zavolá fn max n-krát při výjimce.
```python import time def retry(fn, n=3, delay=0.1): last = None for _ in range(n): try: return fn() except Exception as e: last = e time.sleep(delay) raise last ```
null
Generate a string representation of a binary tree.
def tree_str(root): if root is None: return '' left_str = tree_str(root.left) right_str = tree_str(root.right) if left_str != '' and right_str != '': return '(' + left_str + ')' + str(root.val) + '(' + right_str + ')' if left_str != '' and right_str == '': return '(' + left_str + ')' + str(root.val) if left_str == '' a...
null
Stručně shrň článek o tématu „Hodina“ a uveď hlavní fakta.
**Hodina** Hodina (značka h) je jedna z jednotek času. Hodina byla dříve v soustavě SI vedlejší jednotkou času. Tato kategorie však byla v r. 2007 zrušena a hodina je v současnosti považován za mimosoustavovou jednotku, jejíž používání souběžně s jednotkami SI však akceptuje Příručka SI i Mezinárodní výbor pro míry a ...
null
Summarize key facts about „Cores (film)“ clearly and accurately.
**Cores (film)** Cores (Portuguese for "Colors") is a 2012 Brazilian drama film that was released on May 10, 2013. It is the debut film of director Francisco Garcia, who also wrote the script together with Gabriel Campos. The film was premiered at the 60th San Sebastián International Film Festival in 2012, and was als...
null
Stručně shrň článek o tématu „Valivý odpor“ a uveď hlavní fakta.
**Valivý odpor** Valivý odpor (nepřesně valivé tření, neboť se stýkající se povrchy navzájem netřou) je odpor, který působí na těleso kruhového průřezu při jeho valivém pohybu po podložce. Fyzikální princip V místě kontaktu pružného (plného) válcového tělesa s pružnou rovinnou podložkou dochází vlivem jejich deformace...
null
Create a HTML form with name, email address and a submit button.
<form> Name: <input type="text" name="name"><br> Email: <input type="email" name="email"><br> <input type="submit" value="Submit"> </form>
null
Stručně shrň článek o tématu „Sandro Mazzola“ a uveď hlavní fakta.
**Sandro Mazzola** Alessandro „Sandro“ Mazzola (* 8. listopad 1942) je bývalý italský fotbalista. Hrával na pozici útočníka či ofenzivního záložníka. S italskou reprezentací se stal mistrem Evropy 1968 (zařazen do all-stars turnaje) a získal stříbrnou medaili na mistrovství světa v Mexiku roku 1970. Hrál i na světovýc...
null
Using the list of numbers, create a function to sort the list into ascending order.
numbers = [6, 4, 3, 2, 8]
def sort_ascending(numbers): numbers.sort() return numbers
null
Odpověz pouze česky, stručně: hlavní město ČR?
Hlavní město České republiky je Praha.
null
Edit the following array in JavaScript so that all the strings are in uppercase.
let array = ['cat', 'dog', 'fish'];
let array = ['CAT', 'DOG', 'FISH'];
null
Stručně shrň článek o tématu „Trosečníci v řece meteorů“ a uveď hlavní fakta.
**Trosečníci v řece meteorů** Trosečníci v řece meteorů je český název knihy, kterou napsal v roce 1962 polský spisovatel Jerzy Broszkiewicz. Originální název románu je Ci z Dziesiątego Tysiąca. Novela patří do žánru science fiction a je určena především pro mládež. Technická data o knize Vydavatelem českého vydání by...
null
Write the C++ code to print the smallest prime factor of a given number
number = 54
int main() { int factor = 2; int number = 54; while (number > 1) { if (number % factor == 0) { cout << factor << endl; number /= factor; } else factor++; } return 0; }
null
Devise a recursive solution to the problem.
Find the sum of all numbers from 1 to N
def sum_recursive(n): if n == 0: return 0 else: return n + sum_recursive(n-1)
null
Construct a machine learning model to classify a given dataset into two class labels.
Dataset
Using a dataset with two class labels (e.g., yes/no, 0/1, etc.), a machine learning model can be constructed, for example, by using a Support Vector Machine (SVM) method with a suitable kernel. The inputs to the model would be the features from the dataset and the output would be the predicted class labels. The SVM alg...
null
Create an array of random integers between 1 to 10 using the function **np.random.randint**.
# Create array of random integers between 1 to 10 import numpy as np random_integers = np.random.randint(low=1, high=10, size=10)
null
Stručně shrň článek o tématu „Edgar Allan Poe“ a uveď hlavní fakta.
**Edgar Allan Poe** Edgar Allan Poe (19. ledna 1809 Boston – 7. října 1849 Baltimore) byl americký romantický básník, prozaik, literární teoretik a esejista. Byl autorem zpravidla fantastických a mystických příběhů a zakladatelem detektivního a hororového žánru. Dokázal mistrovsky zachytit stav osoby, která příběh vyp...
null
Kolik je 14 × 9?
14 × 9 = 126
null
null
null
null
Pee-Wee Wanninger Paul Louis Wanninger (December 12, 1902 – March 7, 1981) was a backup shortstop in Major League Baseball who played in and for the New York Yankees (1925), Boston Red Sox (1927) and Cincinnati Reds (1927). Listed at , 150 lb., he batted left-handed and threw right-handed. A native of Birmingham, Alab...
Summarize key facts about „Togavirin“ clearly and accurately.
**Togavirin** Togavirin (, Sindbis virus protease, Sindbis virus core protein, NsP2 proteinase) is an enzyme. This enzyme catalyses the following chemical reaction Autocatalytic release of the core protein from the N-terminus of the togavirus structural polyprotein by hydrolysis of a -Trp-Ser- bond This enzyme is isol...
null
Summarize key facts about „Ilse Ipsen“ clearly and accurately.
**Ilse Ipsen** Ilse Clara Franziska Ipsen is a German-American mathematician who works as a professor of mathematics at North Carolina State University. She was formerly associate director of the Statistical and Applied Mathematical Sciences Institute, a joint venture of North Carolina State and other nearby universit...
null
Stručně shrň článek o tématu „Stuart MacBride“ a uveď hlavní fakta.
**Stuart MacBride** Stuart MacBride (* 27. února 1969 Dumbarton) je skotský romanopisec. Studoval architekturu na Heriot-Watt University v Edinburghu. Svůj první román nazvaný Cold Granite publikoval v roce 2005. Vyskytuje se v něm postava detektiva jménem Logan McRae, který se objevil i v jeho dalších knihách. Je aut...
null
Ukaž čistý kód: zopakuje řetězec n-krát. Pojmenuj funkci `repeat_str`.
```python def repeat_str(s: str, n: int) -> str: return s * n ```
null
Summarize key facts about „Cameron Balloons“ clearly and accurately.
**Cameron Balloons** Cameron Balloons is a company established in 1971 in Bristol, England, by Don Cameron to manufacture hot air balloons. Cameron had previously, with others, constructed ten hot air balloons under the name Omega. Production was in the basement of his house, moving in 1972 to an old church in the cit...
null
null
null
null
Croatian Party of Rights — Dr. Ante Starčević Croatian Party of Rights Dr. Ante Starčević ( or HSP AS) was a nationalist political party in Croatia. It was founded in 2009 by Ruža Tomašić and others as a splinter party from the Croatian Party of Rights. It is named after Ante Starčević (1823–1896). In 2011, they repor...
Create a JavaScript constant to define a tax rate.
const TAX_RATE = 0.2;
null
How to hide a particular div when a button is clicked?
document.getElementById("div_id").style.display="none";
null
null
null
null
Coulomb Coulomb je odvozená jednotka SI veličiny elektrický náboj. Pojmenována byla na počest francouzského fyzika Charlese-Augustina de Coulomba. Značkou coulombu je C. Definice Je definován jako elektrický náboj přenesený proudem 1 ampéru během 1 sekundy (tzn. 1 coulomb = 1 ampérsekunda). C = A ⋅ s Vlastnosti Veliko...
What is the chemical symbol for gold?
Au (from Latin aurum).
null
Stručně shrň článek o tématu „DLT“ a uveď hlavní fakta.
**DLT** DLT - projekt, anglicky Distributed Language Translation, esperantsky Distribuita Lingvo-Tradukado. Projekt probíhal v 80. letech financován Evropskou komisí a spolufinancován nizozemskou leteckou společností Fokker. Jednalo se o celkem úspěšný projekt jazykového strojového překladu z 12 evropských jazyků. Mez...
null
PHP snippet: env get
```php function env(string $key, $default=null) { $v = $_ENV[$key] ?? getenv($key); return ($v === false || $v === null || $v === '') ? $default : $v; } ```
null
Write an SQL query to return rows from a table and sorted in ascending order.
Table Name: Animals
SELECT * FROM Animals ORDER BY Animals ASC
null
Stručně shrň článek o tématu „Munchovo muzeum“ a uveď hlavní fakta.
**Munchovo muzeum** Munchovo muzeum (norsky Munch-museet) je muzeum umění v norském Oslu zaměřené na dílo a život norského výtvarného umělce Edvarda Muncha. Muzeum bylo otevřeno v roce 1963 k příležitosti výročí sta let od narození umělce. Založení muzea bylo financováno ze zisku městských kin v Oslu. Sbírky muzea obs...
null
Stručně shrň článek o tématu „Juliánský kalendář“ a uveď hlavní fakta.
**Juliánský kalendář** Juliánský kalendář je kalendář, který v roce 46 př. n. l. s platností od 45 př. n. l. zavedl Julius Caesar. Tento kalendář byl reformou starořímského kalendáře a byl koncipován jako sluneční kalendář s délkou roku 365 dní a každým čtvrtým přestupným rokem o 366 dnech. Drobná úprava kalendáře (zm...
null
Stručně shrň článek o tématu „Jan Werner“ a uveď hlavní fakta.
**Jan Werner** Jan Werner (5. února 1933 – 20. ledna 2021) byl český stavební inženýr a esperantista. Narodil se v Návsí u Jablunkova v rodině krejčího, dětství prožil v Jablunkově (do roku 1938) a Horních Heřmanicích v okrese Ústí nad Orlicí (do roku 1945), po válce se rodina přestěhovala do Lanškrouna, kde hned v zá...
null
Kolik je 29 - 5?
29 - 5 = 24
null
Write an SQL query that returns all the students with their marks from the following table.
Student ( id, name, marks) Marks (sub_id, marks)
SELECT s.name, m.marks FROM Student s, Marks m WHERE s.id = m.sub_id
null
Summarize key facts about „Wasila Diwura-Soale“ clearly and accurately.
**Wasila Diwura-Soale** Wasila Diwura-Soale (born 1 September 1996) is a Ghanaian footballer who plays as a midfielder for the Ghana women's national team. Diwura-Soale played for Ghana at U-17 level in 2012 and was part of the Black Maidens squad that placed third at the 2012 World Cup in Azerbaijan. She also feature...
null
Write a Python function that prints the frequencies of even and odd numbers in a given array.
[2, 5, 4, 6, 8, 10]
def frequency_of_odd_and_even(arr): freq_even = 0 freq_odd = 0 for i in arr: if i % 2 == 0: freq_even += 1 else: freq_odd += 1 print("Frequency of even numbers:", freq_even) print("Frequency of odd numbers:", freq_odd)
null
Generate a random password of length 8 using Python.
import random def generate_password(length): chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890" password = "" for i in range(length): index = random.randint(0, len(chars)-1) password += chars[index] return password length = 8 password = generate_password(length) print("Here's your random password:...
null
Stručně shrň článek o tématu „Richard Placht“ a uveď hlavní fakta.
**Richard Placht** Richard Placht (4. ledna 1880 Chrastava – 2. února 1962 Vídeň) byl sochař, rytec a medailér severočeského (sudetoněmeckého) původu. Život Studia Richard Placht v letech 1891–1895 navštěvoval nižší gymnasium v České Lípě. V letech 1895–1898 vystudoval odbornou uměleckořemeslnou školu v Jablonci nad N...
null
co umíš?
Pomáhám s programováním, vysvětlováním, češtinou, návrhem kódu a debugováním. Napiš konkrétní úkol.
null
Create a regular expression that verifies the following pattern: contains one or more digits followed by a hyphen followed by one or more digits.
exp = re.compile("\d+-\d+")
null
Spočítej: 24 + 12 = ?
24 + 12 = 36
null
Write a function to identify leap year.
def isLeapYear(year): if (year % 4 == 0 and year % 100 != 0) or year % 400 == 0: return True else: return False
null
Write a code to return the first 3 elements in a list.
mylist = [1,4,3,6,7,2,4]
mylist[:3]
null
Summarize key facts about „Return to Earth 91–93“ clearly and accurately.
**Return to Earth 91–93** Return to Earth 91–93 is a compilation album from California Stoner rock band Fu Manchu on Elastic Records. The album is a collection of three early singles released in 1992, along with two bonus songs. The band features Scott Votaw on lead guitar before he was replaced by Eddie Glass on the ...
null
null
null
null
Seznam poslanců Českého zemského sněmu (1908–1913) Toto je seznam poslanců Českého zemského sněmu ve volebním období 1908–1913. Zahrnuje všechny členy Českého zemského sněmu ve funkčním období od zemských voleb roku 1908 až do rozpuštění sněmu Anenskými patenty roku 1913. Vysvětlivky č. agrárník – Českoslovanská agrár...
Extract the first 2 elements from a given array.
arr = [1, 2, 3, 4, 5]
def extract_first_two(arr): return arr[:2] arr = [1, 2, 3, 4, 5] result = extract_first_two(arr) print (result) # Output: [1, 2]
null
Summarize key facts about „Ray Charles in Person“ clearly and accurately.
**Ray Charles in Person** In Person is a live album recorded by Ray Charles on May 28, 1959 on a rainy night in Atlanta, Georgia at Morris Brown College's Herndon Stadium. All tracks from this album together with those from Ray Charles at Newport were also released on the 1987 Atlantic compilation CD, Ray Charles Live...
null
null
null
null
Bresnahan Bresnahan is a surname. Notable people with the surname include: Chuck Bresnahan (born 1960), American football coach Patrick Francis Bresnahan (1872–1940), U.S. Navy sailor Roger Bresnahan (1879–1944), American baseball player Tom Bresnahan, American football player Timothy Bresnahan (born 1953), American e...
null
null
null
Gruškovec Gruškovec () is a settlement in the Municipality of Cirkulane in the Haloze area of eastern Slovenia, next to the border with Croatia. The area traditionally belonged to the Styria region. It is now included in the Drava Statistical Region. There is a small simple chapel-shrine in the settlement. It was buil...
Create a function to categorize a given array of numbers into prime and composite numbers.
arr = [2, 5, 7, 11, 17, 21, 25]
def is_prime(num): # check prime divisors = [] for x in range(1, num + 1): if (num % x == 0): divisors.append(x) if len(divisors) == 2: return True else: return False def categorize_numbers(arr): prime_nums = [] composite_nums = [] for number in arr: if is_prime(number): prime_nums.append(number) else: composite_nums.a...
null
Print a message based on the given age.
Age: 32
Print("Welcome! You are {age} years old")
null
Stručně shrň článek o tématu „Různokřídlice“ a uveď hlavní fakta.
**Různokřídlice** Různokřídlice, někdy též jako šídla, (Anisoptera) jsou jeden ze dvou velkých podřádů vážek. Na celém světě existuje asi 2871 druhů. Popis Oproti vážkám z podřádu stejnokřídlic jsou mnohem větší. Tělo mají daleko mohutnější. Oči mají více u sebe, jsou větší a často se dotýkají. Přední a zadní křídla j...
null
Identify if a given integer is odd or even.
43
def identify_odd_even(num): if num % 2 == 0: return "even" else: return "odd"
null
Generate a list of all even numbers between 20 and 40.
even_numbers = [] for num in range(20, 41): if num % 2 == 0: even_numbers.append(num) print(even_numbers) # Output: [20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40]
null
What is Big O notation?
Big O notation is a measure of the complexity of an algorithm. It describes the worst-case complexity of a given algorithm in terms of time and/or space as the problem size increases. It can indicate whether an algorithm's performance increases linearly or exponentially as the problem size increases.
null
null
null
null
Nestěrov Nestěrov, též Něstěrov ( Не́стеров; Stallupönen v letech 1938 až 1946 Ebenrode; Stalupėnai; Stołupiany) je město v Kaliningradské oblasti v Rusku ležící 140 km východně od Kaliningradu v blízkosti hranice s Litvou. V roce 2010 žily ve městě necelé 4 tisíce obyvatel převážně ruské národnosti. Dějiny města Ve s...
Write an SQL query to fetch all records from the 'orders' table, that have a status of either 'pending' or 'shipped'.
SELECT * FROM orders WHERE status IN ('pending', 'shipped');
null
Kolik je 24 × 2?
24 × 2 = 48
null
Stručně shrň článek o tématu „17. březen“ a uveď hlavní fakta.
**17. březen** 17. březen je 76. den roku podle gregoriánského kalendáře (77. v přestupném roce). Do konce roku zbývá 289 dní. Svátek má Vlastimil. Události Česko 938 – Ostatky knížete Václava byly přeneseny do Prahy. 1620 – Kněz Jan Sarkander se nepřiznal k obvinění a po dlouhém mučení v Olomouci umírá. 1939 Triumfál...
null
What is 9 - 3?
9 - 3 = 6
null
Build an HTML form containing 3 input elements (name, email, password) and a submit button.
<form action=""> Name: <input type="text" name="name"> Email: <input type="email" name="email"> Password: <input type="password" name="password"> <input type="submit" value="Submit"> </form>
null
Create function to return the cube of a number.
def cube_number(x): return x**3
null
Stručně shrň článek o tématu „Panelstory“ a uveď hlavní fakta.
**Panelstory** Panelstory aneb Jak se rodí sídliště je český barevný film z roku 1979 režisérky Věry Chytilové natočený ve Filmovém studiu Barrandov, premiéru měl 1. prosince 1981. Jedná se o společenskou satiru kritizující stav normalizační společnosti v 70. letech 20. století v Československu. Mimo jiné také šlo o u...
null
Stručně shrň článek o tématu „Proudění“ a uveď hlavní fakta.
**Proudění** Proudění je pohyb tekutiny, při kterém se částice tekutiny pohybují svým neuspořádaným pohybem a zároveň se posouvají ve směru proudění. Tekutina (tj. plyn nebo kapalina) vždy proudí z místa vyššího tlaku (vyšší tlakové potenciální energie) do místa nižšího tlaku (nižší tlakové potenciální energie). Proud...
null
Spočítej 17×5
17 × 5 = 85
null
Modify the given code to debug 'NameError: name 'x' is not defined'.
nums = range(20) for x in nums: if x % 2 == 0: print(square(x))
nums = range(20) for x in nums: if x % 2 == 0: print(x**2)
null
Is a valid ISBN-10 number?
isbn = "0478156686"
import re def is_valid_isbn(isbn): pattern = r"^\d{9}[\d|X]$" # ISBN is a string with 10 digits return True if re.match(pattern, isbn) else False is_valid_isbn(isbn) # Returns True
null
Napiš Python funkci: vrátí posledních n prvků (`last_n`).
```python def last_n(xs: list, n: int) -> list: return xs[-n:] if n else [] ```
null
null
null
null
Solo for Canary Solo for Canary is a British thriller television series which originally aired on the BBC in 1958. Selected cast Andrew Osborn as Supt. Maddern Lana Morris as Ruth Maddern David Davies as Chief Supt. Drew John Stone as Det. Supt. Wilson Ilona Ference as Rose Edward Kelsey as Flower William Lucas as Dur...
null
null
null
Minerální olej Minerální olej (též ropný olej) je jedním z produktů frakční destilace ropy. Je to průhledný, bezbarvý olej složený především z alkanů (typicky s 15 až 40 atomy uhlíku v molekule) a cyklických parafinů, příbuzný s vazelínou (známou též jako bílá vazelina, v lékopisu latinsky Vaselinum album). Má hustotu...
Kolik je 28 × 2?
28 × 2 = 56
null
Napiš řešení v Pythonu: Valid parentheses.
```python def valid_parens(s: str) -> bool: pairs = {')':'(', ']':'[', '}':'{'} st = [] for ch in s: if ch in '([{': st.append(ch) elif ch in pairs: if not st or st[-1] != pairs[ch]: return False st.pop() return not st ```
null
null
null
null
Orcistus Orcistus or Orkistos () was a city originally in the northeast of ancient Phrygia and later a bishopric in the Roman province of Galatia Secunda, situated south of the town now called Ortaköy, Afyonkarahissar, and previously Alikel Yaila. City status Originally an independent city of Galatia, it was annexed t...
Summarize key facts about „Ōtoko River“ clearly and accurately.
**Ōtoko River** The Ōtoko River is a river of the West Coast Region of New Zealand's South Island. It flows generally northwest from the northern slopes of Mount Hooker, reaching the Paringa River 20 kilometres south of Bruce Bay. The New Zealand Ministry for Culture and Heritage gives a translation of "place of the s...
null
Implementuj `avg_list` v Pythonu — spočítej průměr.
```python def avg_list(xs: list[float]) -> float: return sum(xs) / len(xs) if xs else 0.0 ```
null
Stručně shrň článek o tématu „Translatologie“ a uveď hlavní fakta.
**Translatologie** Translatologie je věda o překladu a tlumočení, respektive interdisciplinární vědní obor zabývající se převodem textů z jednoho jazyka do jiného, případně z jednoho sémiotického systému do jiného, ať už překladatelem lidským nebo překladačem strojovým, písemně (překlad) nebo ústně (tlumočení). Zajímá...
null
Summarize key facts about „Touchdown Jesus“ clearly and accurately.
**Touchdown Jesus** Touchdown Jesus may refer to: Word of Life or Touchdown Jesus, a mural visible from Notre Dame Stadium, in Notre Dame, Indiana. King of Kings (statue) or Touchdown Jesus, a statue that was on the east side of Interstate 75 near Monroe, Ohio. "Touchdown Jesus", a song from Tim McGraw's Emotional Tra...
null
null
null
null
Bettina G. Keller Bettina G. Keller is a professor for Theoretical Chemistry at Freie Universität Berlin. Life and education Keller did her Abitur at the Remstal-Gymnasium Weinstadt in 2000. In October 2000, she started her diploma studies at University of Karlsruhe, Germany. In 2002, she continued her diploma studies...