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
#include<bits/stdc++.h> | |
#define REP(i,n) for (int i = 0; i < n; i++) | |
#define mod 1000000007 | |
#define pb push_back | |
#define ff first | |
#define ss second | |
#define ii pair<int,int> | |
#define vi vector<int> | |
#define vii vector<ii> | |
#define lli long long int |
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
largest = None | |
smallest = None | |
while True: | |
num = input("Enter a number: ") | |
if num == "done": | |
break | |
try: | |
n = int(num) | |
if smallest is None or n < smallest: |
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
def computepay(h, r): | |
if h > 40: | |
p = 1.5 * r * (h - 40) + (40 * r) | |
else: | |
p = h * r | |
return p | |
hrs = float(input("Enter Hours:")) | |
rphrs = float(input("Enter rate per hour:")) |
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
score = float(input("enter a score:")) | |
s = score | |
if 0.0 <= s <= 1.0: | |
if s >= 0.9: | |
result = "A" | |
print(result) | |
elif 0.8 <= s < 0.9: | |
result = "B" |
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
hrs = float(input("Enter Hours:")) | |
rate = float(input("Enter the Rate:")) | |
if hrs <= 40: | |
print( hrs * rate) | |
elif hrs > 40: | |
print(40* rate + (hrs-40)*1.5*rate) |
NewerOlder