This file contains hidden or 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 { test, expect } from '@playwright/test' | |
test('Calculator operations work as expected : 5 * 3 = 15', async ({ | |
page, | |
}) => { | |
await page.goto('https://www.desmos.com/scientific?lang=fr') | |
await page.getByRole('button', { name: '5' }).click() | |
await page.getByRole('button', { name: 'Multiplier' }).click() | |
await page.getByRole('button', { name: '3' }).click() |
This file contains hidden or 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
const wilderRepository = AppDataSource.getRepository(Wilder) | |
const skillRepository = AppDataSource.getRepository(Skill) | |
const gradeRepository = AppDataSource.getRepository(Grade) | |
const wilderController: IController = { | |
create: async (req, res) => { | |
try { | |
const { name, city, description, grades }: IIncomingWilder = | |
req.body | |
const newWilder = { |
This file contains hidden or 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
export interface User { | |
name: string | |
age?: number | |
birthday?: string | |
} | |
// challenge.ts | |
const prettyPrintWilder = (users: User[]): void => { | |
users.map((user) => { | |
console.log(`${user.name} is ${user.age} years old`) |
This file contains hidden or 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
# Michele Pratusevich's exercises found @ http://www.practicepython.org/exercises | |
# exercise n°6 : | |
# Ask the user for a string and print out whether this string is a palindrome or not. (A palindrome is a string that reads the same forwards and backwards.) | |
def decor(func): | |
def wrap(): | |
print ("=======================") | |
func() | |
print ("=======================") |
This file contains hidden or 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
# Michele Pratusevich's exercises found @ http://www.practicepython.org/exercises | |
# exercise n°5 : | |
# Take two lists, say for example these two: | |
# a = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89] | |
# b = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13] | |
# and write a program that returns a list that contains only the elements that are common between the lists (without duplicates). Make sure your program works on two lists of different sizes. | |
# Extras: |
This file contains hidden or 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
# Michele Pratusevich's exercises found @ http://www.practicepython.org/exercises | |
# exercise n°4 : | |
# Create a program that asks the user for a number and then prints out a list of all the divisors of that number. (If you don’t know what a divisor is, it is a number that divides evenly into another number. For example, 13 is a divisor of 26 because 26 / 13 has no remainder.) | |
def decor(func): | |
def wrap(): | |
print ("=======================") | |
func() | |
print ("=======================") |
This file contains hidden or 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
# Michele Pratusevich's exercises found @ http://www.practicepython.org/exercises | |
# exercise n°3 : | |
# Take a list, say for example this one: | |
# a = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89] | |
# and write a program that prints out all the elements of the list that are less than 5. | |
# Extras: |
This file contains hidden or 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
# Michele Pratusevich's exercises found @ http://www.practicepython.org/exercises | |
# exercise n°2 : | |
# Ask the user for a number. Depending on whether the number is even or odd, print out an appropriate message to the user. Hint: how does an even / odd number react differently when divided by 2? | |
# Extras: | |
# If the number is a multiple of 4, print out a different message. | |
# Ask the user for two numbers: one number to check (call it num) and one number to divide by (check). If check divides evenly into num, tell that to the user. If not, print a different appropriate message. |
This file contains hidden or 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
# Michele Pratusevich's exercises found @ http://www.practicepython.org/exercises | |
# exercise n°1 : | |
# Create a program that asks the user to enter their name and their age. Print out a message addressed to them that tells them the year that they will turn 100 years old. | |
# Extras: | |
# Add on to the previous program by asking the user for another number and printing out that many copies of the previous message. (Hint: order of operations exists in Python) | |
# Print out that many copies of the previous message on separate lines. (Hint: the string "\n is the same as pressing the ENTER button) | |
print ("Hi!") |