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 loginBtn = document.querySelector(".loginBtn") | |
const logoutBtn = document.querySelector(".logoutBtn") | |
const greetMsg = document.querySelector(".greet") | |
const emailInput = document.querySelector("#email") | |
const emailLogin = document.querySelector(".emailLogin") | |
const formDiv = document.querySelector(".formDiv") | |
// დავამატოთ კოდი, რის მიხედვითაც გამოსვლის ღილაკი | |
// თავიდან იქნება დამალული. | |
logoutBtn.style.display = "none" |
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
<form [formGroup]="form" (ngSubmit)="onSubmit()"> | |
<label for="firstName">First Name:</label><br /> | |
<input | |
id="firstName" | |
formControlName="firstName" | |
(input)="setValue($event)" | |
/><br /> | |
<label for="lastName">Last Name:</label><br /> | |
<input | |
id="lastName" |
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 math | |
ppl = int(input("How many people? \n")) | |
pizza = int(input("How many pizzas do you have? \n")) | |
slice = int(input("How many slices per pizza? \n")) | |
print(f"{ppl} people with {pizza} pizzas Each person gets {math.floor(slice*pizza/ppl)} pieces of pizza. \n There are {math.ceil(slice*pizza%ppl)} leftover pieces.") |
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
lengthft = int(input("enter length in ft \n")) | |
widthft = int(input("enter width in ft\n")) | |
areaft = lengthft*widthft | |
ftToM2 = areaft*0.09290304 | |
print(f"You entered dimensions of {lengthft} feet by {widthft} feet. \n The area is {areaft} square feet \n {ftToM2} square meters") |
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
currentAge = int(input("What is your current age? \n")) | |
retireAge = int(input("At what age would you like to retire? \n")) | |
print(f"you have {retireAge-currentAge} years until you can retire. \n it\'s 2023, so you can retire in {2023+(retireAge-currentAge)}") |
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
num1 = int(input("enter first number")) | |
num2 = int(input("enter second number")) | |
print(f"ორი რიცხვის ჯამი არის: ${num1+num2} \n ორი რიცხვის სხვაობა არის: ${num1-num2} \n ორი რიცხვის ნამრავლი არის: ${num1*num2} \n ორი რიცხვის სხვაობა არის: ${num1/num2} \n") |
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
def inps(): | |
noun =input("enter noun \n") | |
verb = input("enter verb \n") | |
adj = input("enter adjecctive \n") | |
adv = input("enter adverb \n") | |
sentence = adj + " " +noun +" " + verb +" " + adv | |
return sentence | |
print (inps()) |
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
def main(): | |
dollars = dollars_to_float(int(input("How much was the meal? "))) | |
percent = percent_to_float(int(input("What percentage would you like to tip? "))) | |
tip = dollars * percent | |
print(f"Leave ${tip:.2f}") | |
def dollars_to_float(d): | |
return round(d, 1) |
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
mass = int(input("enter mass")) | |
speed = 300000000 | |
energy = mass*(speed**2) | |
print(energy) |
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
def convert(text): | |
text = text.replace(":)", "🙂") | |
text = text.replace(":(", "😔") | |
return text | |
txt = input("Enter text: ") | |
converted_text = convert(txt) | |
print(converted_text) |
NewerOlder