Compare commits
10
Commits
de8d71e62b
...
e7d9cddf4a
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e7d9cddf4a | ||
|
|
7f87cd1d0a | ||
|
|
9f6d556bcd | ||
|
|
28504e1963 | ||
|
|
414c038def | ||
|
|
f38511f5e3 | ||
|
|
062f416445 | ||
|
|
59c8073308 | ||
|
|
f2a5d63eac | ||
|
|
8f241579c2 |
@@ -0,0 +1,8 @@
|
||||
chilometri = 12.25
|
||||
miglia = 7.38
|
||||
|
||||
miglia_a_chilometri = 1.61*miglia
|
||||
chilometri_a_miglia = chilometri/1.61
|
||||
|
||||
print(miglia, "miglia è", round(miglia_a_chilometri, 2), "chilometri")
|
||||
print(chilometri, "chilometri è", round(chilometri_a_miglia, 2), "miglia")
|
||||
@@ -0,0 +1,14 @@
|
||||
a = input("Inserire un valore per la variabile a:")
|
||||
b = input("Inserire un valore per la variabile b:")
|
||||
|
||||
# con la funzione input sono di tipo str
|
||||
|
||||
a=int(a)
|
||||
b=int(b)
|
||||
|
||||
print("Il risultato dell'addizione è",a+b)
|
||||
print("Il risultato della sottrazione è", a-b)
|
||||
print("Il risultato della moltiplicazione è", a*b)
|
||||
print("Il risultato della divisione è",a/b)
|
||||
|
||||
print("\nE' tutto gente")
|
||||
@@ -0,0 +1,10 @@
|
||||
hour = int(input("Starting time (hours):"))
|
||||
mins = int(input("Starting time (minutes):"))
|
||||
dura = int(input("Event duration (minutes):"))
|
||||
|
||||
m = (dura+mins)
|
||||
h = ((m+hour)//60) % 24
|
||||
|
||||
m = m % 60
|
||||
|
||||
print("Uscita prevista:", h,":",m)
|
||||
@@ -0,0 +1,10 @@
|
||||
stringa = input("Inserire qualcosa:")
|
||||
|
||||
if stringa=="Spathiphyllum":
|
||||
print("Si, lo Spathiphyllum è la pianta migliore in assoluto!")
|
||||
|
||||
elif stringa=="spathiphyllum":
|
||||
print("No, voglio un grande Spathiphyllum")
|
||||
|
||||
else:
|
||||
print("Spathiphyllum! Non", stringa)
|
||||
@@ -0,0 +1,12 @@
|
||||
income = float(input("Enter the annual income: "))
|
||||
|
||||
if income<85528:
|
||||
tax = income*0.18 - 556.2
|
||||
else:
|
||||
tax = 14839.2 + 0.32 * (income - 85528)
|
||||
|
||||
if tax<0:
|
||||
tax = 0
|
||||
|
||||
tax = round(tax, 0)
|
||||
print("The tax is:", tax, "thalers")
|
||||
@@ -0,0 +1,13 @@
|
||||
year = int(input("Enter a year: "))
|
||||
|
||||
if year<1582:
|
||||
print("Non rientra nel calendario gregoriano")
|
||||
elif year % 4 != 0:
|
||||
print("Anno comune")
|
||||
elif year % 100 != 0:
|
||||
print("Anno bisestile")
|
||||
elif year % 400 != 0:
|
||||
print("Anno comune")
|
||||
else:
|
||||
print("Anno bisestile")
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
sectret_number = 777
|
||||
|
||||
print(
|
||||
"""
|
||||
+================================+
|
||||
| Welcome to my game, muggle! |
|
||||
| Enter an integer number |
|
||||
| and guess what number I've |
|
||||
| picked for you. |
|
||||
| So, what is the secret number? |
|
||||
+================================+
|
||||
""")
|
||||
|
||||
number = 0
|
||||
|
||||
while number != sectret_number:
|
||||
number = int(input("Indovina il numenro segreto: "))
|
||||
|
||||
if number == sectret_number:
|
||||
print("Ben fatto, babbano! Ora sei libero")
|
||||
continue
|
||||
else:
|
||||
print("Ha ha! Sei bloccato nel mio loop!")
|
||||
@@ -0,0 +1,7 @@
|
||||
import time
|
||||
|
||||
for i in range (1,6):
|
||||
print(i, "Mississippi")
|
||||
time.sleep(1)
|
||||
|
||||
print("Pronto o no, arrivo!")
|
||||
Reference in New Issue
Block a user