blob_id stringlengths 40 40 | repo_name stringlengths 5 127 | path stringlengths 2 523 | length_bytes int64 22 545k | score float64 3.5 5.34 | int_score int64 4 5 | text stringlengths 22 545k |
|---|---|---|---|---|---|---|
5df6512bbc077cb9c6c4b4d6c540c801f8673bf0 | Rauatorres/Calculadora-Tempo-Python | /main/mainwindow.py | 2,517 | 4.03125 | 4 | from tkinter import *
from TimeCalculator import Time
# Criando a janela
window = Tk()
window.title('Calculadora de Tempo')
window.geometry('450x180')
# Quantidade de tempo que será usada como base da operação
hours_base = Entry(window, width=7)
minutes_base = Entry(window, width=7)
seconds_base = Entry(window, w... |
8be3e9d2125637bf1f8e03aea801f80822c9796c | ronniejoshua/mypython_cookbook | /myargparse/argument_parser.py | 2,257 | 3.84375 | 4 | #! /usr/bin/env python3
import argparse
import sys
def fibonacci(n: int) -> int:
a, b = 0, 1
assert n >= 0
for i in range(n):
a, b = b, a + b
return a
def main():
# Method 1
if len(sys.argv) > 1:
print("~ sys.argv: ", sys.argv)
print("~ Script: " + sys.argv[0])
... |
08fe0ae9b6aeef56ef1a77add4bd1f61e4ca3b23 | nirvidya8147322767/vidya-python | /11python.py | 224 | 4.09375 | 4 |
a=int(input("enter value for a:"))
b=int(input("enter value for b:"))
c=int(input("enter value for c:"))
if(a>b and a>c):
print(a,"is greater than")
elif(b>c):
print(b,"is greater than")
else:
print(c,"is greater than") |
7d20eabd401d5b02ee45ab1e99674e94487bf12f | NoahTheDuke/foobar | /a_pirate_walks_into_a_bar/solution.py | 331 | 3.609375 | 4 | from random import shuffle
def answer(numbers):
idx = 0
seen = []
while numbers[idx] not in seen:
seen.append(numbers[idx])
idx = seen[-1]
else:
seen.append(numbers[idx])
seen = seen[numbers[idx]:]
return len(seen)
test = [1, 3, 0, 1]
print ans... |
16ab50bdf36bcbb08cb18a6ee2abf2d0b80642fc | miriambautistasalinero/openfda | /newfile.py | 294 | 3.890625 | 4 | a = 1
b= 0
for i in range(5):
print(i)
print("Hello from PyCharm 0")
print("Hello from PyCharm 1")
print("Hello from PyCharm 2")
print("Hello from PyCharm 3")
print("Hello from PyCharm 4")
print("Hello from PyCharm 5")
print("Hello from PyCharm 6")
print("Hello from PyCharm 7")
print("8") |
53701dbd88facb712cc301636c0a023101b242a6 | adriandahlin/python_programming | /CRUD_project/app/products_app.py | 6,270 | 4.28125 | 4 | import csv
csv_file_path = "data/products.csv"
rows = []
with open(csv_file_path, "r") as csv_file:
reader = csv.DictReader(csv_file) # assuming your CSV has headers, otherwise... csv.reader(csv_file)
for row in reader:
rows.append(row)
menu = '''
HELLO. YOU'RE THE BEST.
There are {0} products.
Pl... |
e3eacc2e7aef6a075a6b3c6a9810739b1ff6e15e | VandalTryHard/Test-Task-for-work | /Consult_Test_task/task3.py | 559 | 4.125 | 4 | """3. Создать процедуру обратного отражения порядка строк (сортировки по номеру строки в обратном порядке.
Например номер строки был
1 ae1234
2 bc5678
стал
10000 ae1234
9999 bc5678"""
import csv
with open('file_task3.csv', 'r') as textfile:
for row in reversed(list(csv.reader(textfile))): #reversed возвращ... |
5c3438db915e112b2f621c5a184afa52b2cfde9e | joelbd/CSC110 | /slope.py | 1,728 | 4.0625 | 4 | # file: slope.py
# joelDay
# This program prompts the user to click two points and draws a line
# between them and displays a calculated slope
from graphics import *
def clicks(win, offset, clickLabelLocation, clickLabelText, labelText):
p = win.getMouse()
x, y = p.getX(), p.getY()
p.draw(win)
Text(Point(x + ... |
259d53c7b2581e146cc8b1c5c9d75da5f04ee845 | joelbd/CSC110 | /convertmiles.py | 244 | 4.3125 | 4 | # File: convertmiles.py
# This program converts distance in miles to distance in kilometers
# Day
def main():
miles = eval(input("Enter the distance in miles:"))
kilometers = miles * 1.60934
print("The distance is:",kilometers,"km")
main() |
d4f3b28c6d08b4566c624fb9416d3b1d4dd264bb | joelbd/CSC110 | /fuelEconomy.py | 1,695 | 3.96875 | 4 | # fuelEconomy.py
# joelDay
# This program pulls data from two studies on fuel economy and outputs
# the average gas mileage and statistics for those vehicles
# Create tables to parse the files into
hwy = []
city = []
gasGuzzlersList = []
def readData(fileName):
mpgData = open(fileName, "r")
mpgList = [float(i) f... |
c67b72cbbf79e574247056108c0f423c392f115f | MarkLimML/ASR_Weather | /local/validate_texts.py | 904 | 3.796875 | 4 | #!/usr/bin/env python3
import sys
if(len(sys.argv) < 3):
print("usage: local/validate_texts.py <start-num> <end-num> <list-of-skipped-numbers>")
print("e.g.: local/validate_texts.py 1 30")
print("validates files numbered 1 to 30")
sys.exit();
min = int(sys.argv[1])
max = int(sys.argv[2])+1
if(len(sys.... |
0b2ef2cb5940e20cbef4e21028ad67f57423d44f | MarkLimML/ASR_Weather | /local/validate_segments.py | 1,333 | 3.546875 | 4 | #!/usr/bin/env python3
import sys
if(len(sys.argv) < 3):
print("usage: local/validate_segments.py <start-num> <end-num> <list-of-skipped-numbers>")
print("e.g.: local/validate_segments.py 1 30")
print("validates files numbered 1 to 30")
sys.exit();
def ins(w):
wsplit = w.split()
nfile = wsplit... |
856d3025d46418fd74cad8c7e11a63010c164163 | karinakozarova/Learning-Python | /basics/arithemetic_operators.py | 265 | 4.0625 | 4 | if __name__ == '__main__':
# Read two integers from STDIN
a = int(input())
b = int(input())
print(a+b) # the sum of the two numbers
print(a-b) # the difference of the two numbers (first - second).
print(a*b) # the product of the two numbers.
|
1df7809084be6b97c8f261ad0894249b08fe4b2a | karinakozarova/Learning-Python | /oop/getting_instancevar.py | 162 | 3.75 | 4 | class Student:
def __init__(self,name,school):
self.name = name
self.school = school
student1 = Student("Harry","TUES")
print(student1.name) |
606e9e43130682294e4ec36c66ec2336fa0dcf6a | karinakozarova/Learning-Python | /oop/employees.py | 2,308 | 3.59375 | 4 | import logging
logging.basicConfig(filename='test.log', level=logging.DEBUG,format='%(asctime)s:%(levelname)s:%(message)s')
class Team:
def __init__(self,company,employees):
self.company = company
self.employees = employees
def print_employees(self):
print("Employees at {}:".format(sel... |
5a70eec32dff189d8e1764801a95abd6b98e60b3 | karinakozarova/Learning-Python | /oop/inheritance.py | 772 | 3.546875 | 4 | class Person:
is_alive = True
def __init__(self,name,age):
self.name = name
self.age = age
@staticmethod
def is_U18(age):
if age < 18:
return True
return False
@classmethod
def all_die(cls):
cls.is_alive = False
def print_kind():
... |
66970d62e5ba7d7f8321eb60b95fb664fcae5491 | HatGuy68/practice | /leetcode/August, 2021/Aug, 9.py | 999 | 4.0625 | 4 | # Add Strings
# Given two non-negative integers, num1 and num2 represented as string, return the sum of num1 and num2 as a string.
# You must solve the problem without using any built-in library for handling large integers (such as BigInteger). You must also not convert the inputs to integers directly.
# Example 1:
... |
55c7bba2a4f47ecffd78f9c336de47a998333e9e | HatGuy68/practice | /leetcode/August, 2021/Aug, 27.py | 1,532 | 3.953125 | 4 | # Longest Uncommon Subsequence II
# Given an array of strings strs, return the length of the longest uncommon subsequence between them. If the longest uncommon subsequence does not exist, return -1.
# An uncommon subsequence between an array of strings is a string that is a subsequence of one string but not the others... |
eb9def82e0e37e87ae4a6b6cb0e6731828eccf13 | HatGuy68/practice | /GreatLearning/Python_ML/lesson-1.py | 1,546 | 3.875 | 4 | import numpy as np
# Single Dimension Array # Type: numpy.ndarray
print('\nSingle Dimension Array # Type: numpy.ndarray')
print('\n>>> np.array([10, 20, 30, 40])')
n1 = np.array([10, 20, 30, 40])
print(n1, type(n1))
print('-'*30)
# Multi Dimension Array
print('\nMulti Dimension Array')
print('\n>>> np.array([[10,20,3... |
2b5c0ef4f42324e5def8728e1baa5ad1f2da4bdc | HatGuy68/practice | /leetcode/September, 2021/Sep, 4.py | 1,779 | 3.84375 | 4 | # Sum of Distances in Tree
# There is an undirected connected tree with n nodes labeled from 0 to n - 1 and n - 1 edges.
# You are given the integer n and the array edges where edges[i] = [ai, bi] indicates that there is an edge between nodes ai and bi in the tree.
# Return an array answer of length n where answer[i] ... |
a9837b4acd39d6edda5a1de91b99b2ce4cd9507d | Bilemon0/pythonDemo | /demo/g.py | 2,596 | 3.515625 | 4 | import datetime
class Person(object):
def __init__(self, name):
self.name = name
try:
lastBlank = name.rindex(' ')
self.lastName = name[lastBlank + 1:]
except AssertionError:
self.lastName = name
self.birthday = None
def getName(self):
... |
67ce73640423384c8d178b18ee1f5061e3efed42 | jackfrate/FESG | /js/order/example.py | 210 | 3.921875 | 4 | import time
second = 1
# after 1 second, print 1
def print1():
time.sleep(second)
print('1')
def print2():
print('2')
# what's gonna happen when we run this?
def main():
print1()
print2()
main()
|
8130a6c5a6982dfd73507d2b98f02ee276fc1ac6 | Patrick-Lenihan/hackathon_productivity | /everythingSoFar.py | 12,840 | 3.546875 | 4 | #Basically combining all the code so far
#So in this code, I've used the database that Eoin created and basically displayed it nicely to the screen
#I used 6 different sql queries to do this. One for each column. e.g. "SELECT Monday FROM timetables" for the monday column, "SELECT Tuesday FROM timetables" for the Tues... |
5a603e12c5dd42a2d28d0b28b96d1d740d57782f | Patrick-Lenihan/hackathon_productivity | /sqlite-database-python.py | 1,290 | 3.9375 | 4 | import sqlite3
#Function that prints the results of an sqlite query to the screen of the gui when "timetable" is clicked.
#To use the database you have to us ctrl,shift,p to open the database so its connected to the python fuction
conn = sqlite3.connect('timetable.db')
c = conn.cursor()
def create_Table():
... |
fd7b4e47122e1b4b2bdb5c7575de9a7092a083b8 | ThinkmanWang/python | /module-test/thinkutils/People.py | 227 | 3.6875 | 4 |
class People:
name=''
age=0
def __init__(self):
self.name='Thinkman'
self.age=32
def toString(self):
szRet = ("I'm %s. I'm %d year old" % (self.name, self.age))
return szRet
|
ee3793cc93d6cbea523b33b9479f1898888060cd | pratsury22/Teradata | /script2.py | 236 | 3.78125 | 4 | #!/usr/bin/python
# This script is used for printing the last word from the string seperated by ':'.
#Author: Prateek Suryawanshi
#Date: 03/02/2017
import re
import sys
f = open("sample.txt", "r")
text = f.read()
print(re.split(':|\n',text)[-2])
|
e92c697601ba858564c81d288988ce97733552e9 | lievbirman/CultureFlow | /control_software_v02/fakeserial.py | 1,800 | 3.796875 | 4 | """
Written by:
D. Thiebaut
"""
# a Serial class emulator
class Serial:
"""
This class is used for simulation of a Serial Connection.
Attributes:
name (string): the name of the port.
port (string): the microcontrollers port for the serial connection.
baudrate (int): The baud rate t... |
16185e7938bb90e02f821d2bdb4b6676106a8c27 | takumi-hasegawa/python-lesson | /7/1.py | 2,717 | 3.59375 | 4 | while True:
def graph_scanning_dict(G, s): # ここでGは頂点隣接リストの辞書表現である.
visited_nodes = set([s])
boundary_nodes = set([s])
while len(boundary_nodes) > 0:
v = boundary_nodes.pop()
for w in G[v]: # graph_scanningと異なるのは,ここだけである.
if w not in visited_nodes:
... |
27f6483e467f3d53bf9f23fd7d2f30b2332048f0 | takumi-hasegawa/python-lesson | /9/3.py | 3,644 | 3.515625 | 4 | import networkx as nx
while True:
def shortest_path_length_without_nx(G, source, target):
'''グラフ上の距離(最短路長)を返す関数
入力は,グラフG,始点source,終点target,
出力は,始点から終点へのグラフ上の距離,ただし始点と終点が同じ連結成分に含まれていない場合には-1'''
C = set([source]) # 始点から到達可能であることがわかっている頂点集合をCとする.最初は始点のみが始点から到達可能であるとわかっている.
queu... |
53dd3f4c7126a5f5d900dd66eaf4ec272e0d3776 | princeatul/tensorflow_certification | /code/california_housing_regression_wide_deep_neural_network.py | 1,826 | 3.703125 | 4 | # installing required packages
from sklearn.datasets import fetch_california_housing
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import StandardScaler
from tensorflow import keras
# fetching housing datasets
housing = fetch_california_housing()
# creating different dataset from t... |
b323e4d6c72d9e99fd977f8c0469ffae1f87fcc1 | srameshv/practice_coding_easy | /fibonacci.py | 1,041 | 3.9375 | 4 | # find the nth fibonacci number
# recursive solution - TIME COMPLEXITY - O(2^n/2)[T(n-1) + T(n-2)]
def fib(n):
# base case
if n <=2 :
f=1 # return 1
else:
f = fib(n-1) + fib(n-2) # return fib(n-1) + fib(n-2)
return f
# Improvement is to add memoization create an empty dict
# before the... |
3b13e5f9d83fd4022bd00cb2dc99a507fb06e639 | srameshv/practice_coding_easy | /lcsubstring.py | 893 | 3.6875 | 4 | def lcsubstring(X, Y, m, n):
LCSuff = [[None]*m+1 for i in n+1]
# To store length of the longest common substring
len = 0
# To store the index of the cell which contains the
# maximum value. This cell's index helps in building
# up the longest common substring from right to left.
row = col =... |
4b5460e55b54cf91ad89a2cfa64e1fd612417788 | a6697238/purdue_lesson | /week4/lab4.py | 2,426 | 3.734375 | 4 | #
# CS 177 – lab4.py
# {NICK YUNING CUI}
# This is a demonstration of the basic Python file function
# The program combines data from two separate files and displays a table with the results from this combination
# the data comes from the BOOYA observations in the Purdue Pulsar Lab
def read(file_name_1,file_name_2):... |
ff241ab8aa6b3a1cef015583f6e876d92ecd5fc5 | a6697238/purdue_lesson | /week5/lab5.py | 2,816 | 3.734375 | 4 | #
# CS 177 – lab5.py
# {NICK YUNING CUI}
# This is a shooting game
# The user can play multiple games without closing the
# graphics window, however anytime the user clicks on the red QUIT box, the graphics window should be closed
# and the Python program ends
#
#
from graphics import *
def main():
dartGame()
... |
1cea9da400db9e0ddb2324f6b98d68a5e6152e8c | arpitt07/LeetCodeProblems | /14. Longest Common Prefix.py | 572 | 3.78125 | 4 | from typing import List
class Solution:
def longestCommonPrefix(self, strs: List[str]) -> str:
minx = min(strs)
maxx = max(strs)
if not strs:
return ""
for i, j in enumerate(minx):
if j != maxx[i]:
return minx[:i]
return minx
if... |
fe2d5b27fd10da4275de1644ff52f614c0b0b724 | arpitt07/LeetCodeProblems | /20. Valid Parentheses.py | 385 | 3.765625 | 4 | class Solution:
def isValid(self, s: str) -> bool:
d = {'(': ')', '{': '}', '[': ']'}
stack = []
for i in s:
if i in d:
stack.append(i)
elif len(stack) == 0 or d[stack.pop()] != i:
return False
return len(stack) == 0
if __name... |
a80ddf31a4e28b238ebd83d30c80ef432bd25a16 | Raktacharitra/TrueCaller-search | /truecaller.py | 1,022 | 4.125 | 4 | from sys import argv
choice = input("Tell us if you want to 'search' a particular contact or 'add' a contact (s / a): ")
if choice.lower() == "s" or choice.lower() == "search":
with open(argv[1], "r") as phone_book:
search_type = input("search by name or number: ")
try:
a = int(search_t... |
6ec410c962390779344666528be65afbae38eeb6 | aK0nshin/euler | /Problem 2.py | 191 | 3.984375 | 4 | #Even Fibonacci numbers
#
#Problem 2
limit = int(input('Enter limit: '))
result = 0
x = 1
y = 1
while x < limit:
if x % 2 == 0:
result += x
x, y = x+y, x
print(result)
|
ea19e0a7148aa782988276db91c489c6899fb5ab | rodowd/chester_pets | /ChesterPets.activity/game/PetSelection.py | 7,317 | 3.65625 | 4 | #!/usr/bin/python
'''
Ryan O'Dowd, Kevin Touhey, and Yifan Hong
CISC 374
Fall 2012
'''
__doc__ = '''
Pet Selection is the scene that
1. Goes through the types of pets
2. Goes through the colors of pets
3. User selects the final pet
Output:
... |
1ddcef96fc94fc3ee5c8db6817e06b1fea01592d | GinRyan/algorithm | /Codes/asdf2014/3_longest_substring_without_repeating_characters/longest_substring_without_repeating_characters.py | 1,470 | 3.765625 | 4 | # https://leetcode.com/problems/longest-substring-without-repeating-characters/
def longest_substring_without_repeating_characters(s):
begin = 0
res = 0
cache = {}
# 遍历字符串
for i, c in enumerate(s):
# 如果当前字符 c 存在于 cache 中
# 且 begin 指针小于等于 cache 中记录的字符下标(说明重复的字符 c,在当前记录的这条"不重复的字符串"中)... |
5a0e7169722a80df415dfd8b91931f15b73c5b97 | top1Dron/PythonLearning | /base_syntax/str_format.py | 169 | 3.90625 | 4 | age = 26
name = 'Swaroop'
print('Возраст {} -- {:.2} лет.'.format(name, 1/3))
print('Почему {} забавляется с этим Python?'.format(name))
|
1a9d78c4ba53825cc4ab1183d6e7a2e101a7be32 | top1Dron/PythonLearning | /Exception/raising.py | 584 | 3.84375 | 4 | class ShortInputException(Exception):
"""User Exception class"""
def __init__(self, length, atLeast):
Exception.__init__(self)
self.length = length
self.atLeast = atLeast
try:
text = input('Enter something --> ')
if len(text) < 3:
raise ShortInputException(len(text), 3... |
0db7ddd2225dc65551df2285f7e00d8686007168 | top1Dron/PythonLearning | /base_syntax/from_import.py | 373 | 3.671875 | 4 | from math import *
n = int(input('Enter number: '))
p = [2, 3]
cnt = 2
a = 5
while cnt < n:
b = 0
for i in range(2, a):
if i <= sqrt(a):
if a % i == 0:
print("a neprost", a)
b = 1
else:
pass
if b != 1:
print("a prost", ... |
22bd36bb944071c63efeb5093901cc81b27ccef6 | zbcstudy/python | /python基础/lesson_04_序列/code/11.字典.py | 764 | 3.90625 | 4 | # 字典
# 使用 {} 来创建字典
d = {} # 创建了一个空字典
# 创建一个保护有数据的字典
# 语法:
# {key:value,key:value,key:value}
# 字典的值可以是任意对象
# 字典的键可以是任意的不可变对象(int、str、bool、tuple ...),但是一般我们都会使用str
# 字典的键是不能重复的,如果出现重复的后边的会替换到前边的
# d = {'name':'孙悟空' , 'age':18 , 'gender':'男' , 'name':'sunwukong'}
d = {
'name': '孙悟空',
'age': 18,
'... |
b7b4cdc267a3f337f6b336d97d8f37f53c3add44 | zbcstudy/python | /python基础/lesson_04_序列/code/03.通用操作.py | 1,555 | 3.703125 | 4 | # + 和 *
# +可以将两个列表拼接为一个列表
my_list = [1, 2, 3] + [4, 5, 6]
# * 可以将列表重复指定的次数
my_list = [1, 2, 3] * 5
print(my_list)
# 创建一个列表
stus = ['孙悟空', '猪八戒', '沙和尚', '唐僧', '蜘蛛精', '白骨精', '沙和尚', '沙和尚']
# in 和 not in
# in用来检查指定元素是否存在于列表中
# 如果存在,返回True,否则返回False
# not in用来检查指定元素是否不在列表中
# 如果不在,返回True,否则返回False
# print('牛魔王' not i... |
0e418bab94e7190df3d914ba7ccf6c2d4ae5e27c | zbcstudy/python | /python基础/lesson_04_序列/code/13.遍历字典.py | 732 | 4 | 4 | # 遍历字典
# keys() 该方法会返回字典的所有的key
# 该方法会返回一个序列,序列中保存有字典的所有的键
d = {'name': '孙悟空', 'age': 18, 'gender': '男'}
# 通过遍历keys()来获取所有的键
# for k in d.keys() :
# print(k , d[k])
d_val = d.values()
print(d_val, type(d_val))
for val in d_val:
print(val)
# values()
# 该方法会返回一个序列,序列中保存有字典的左右的值
# for v in d.values():
# p... |
c8dba8b58ec168af445ee50799e5cf3a2fde604d | zbcstudy/python | /tests/test2.py | 238 | 3.828125 | 4 | name = "ZHaobicheNG"
# 改变大小写
print(name.upper())
fridge = {"cheese": 2, "tomato": 4, "milk": 3}
for key in fridge.keys():
print(key)
# print(dir(fridge))
# 查看对象的私有属性类型
print(type(fridge.__len__()))
|
c125ba91210039073ed7f363b66faf8ae28e2dfd | zbcstudy/python | /python基础/lesson_03_流程控制语句/code/practice/02-test.py | 630 | 3.546875 | 4 | # username = input("请输入用户名:")
# if username == 'admin':
# print("欢迎管理员登录!")
print(123//100)
print(1/3)
# 判断一个数是不是质数
num = int(input("请输入一个大于1的整数:"))
flag = True
i = 2
while i < num:
if num % i == 0:
flag = False
i += 1
if flag:
print(num, "是质数")
else:
print(num, "不是质数")
# 打印1000以内的水仙花数
n... |
b4172cd8b781e19a3cc82e01c9d5fcf3ad05f770 | semone/advent-of-code-2020 | /day13/day13.py | 1,251 | 3.6875 | 4 | # --- Day 13: Shuttle Search ---
import math
def get_closest_departure(earliest, bus):
max = earliest / bus
return math.ceil(max) * bus
def get_earliest_departure(input):
earliest = input[0]
buses = input[1].replace("x,", "").split(",")
times = []
for bus in buses:
surr = get_clos... |
7f2a5513a8acc7e61c7318297abfafd246b06035 | farbtwn/my-first-blog | /tutorial_1.py | 343 | 4.0625 | 4 | name = 'friendo'
if name == 'far':
print('hi, far ^.^')
elif name == 'friendo':
print('hey der bud')
else:
print('whaddafack')
#creating conditions & responses; how do u make the value something that is not static/can be input/changed by users? responds to environment?
def talk():
print('sup bitch')
print... |
ab9eb2db097cd77c07ac2de8861dd5d4b01f8ace | ajeyaajeya/Python_SimpleGame_Rock_Paper_Scissor | /CodeSkulptor_Rock_Paper_Scissor.py | 2,408 | 3.984375 | 4 | # Rock-paper-scissors-lizard-Spock template
#http://www.codeskulptor.org/#user40_1RTz2unP9W_1.py
import random
# The key idea of this program is to equate the strings
# "rock", "paper", "scissors", "lizard", "Spock" to numbers
# as follows:
#
# 0 - rock
# 1 - Spock
# 2 - paper
# 3 - lizard
# 4 - scissors
# helper fun... |
47762e8022dc72302fd0abb06f906e4ac0b8c138 | rogeriosilva-ifpi/teaching-tds-course | /programacao_estruturada/20192_166/Bimestral2_166_20192/Parte_1/cleyson-TDS/questão-4°.py | 599 | 3.75 | 4 | def main():
codigo = int(input("digite o codigo: "))
valor= int(input("digite o valor recebido: "))
troco = valor - codigo
if codigo == 1:
print("valor=4,4, troco:",troco)
elif codigo == 2:
print("valor=4,95, troco:",troco)
elif codigo == 3:
print("valor=5,5, tro... |
0ef6565880879373e657bc8da12c64a5eed967eb | rogeriosilva-ifpi/teaching-tds-course | /programacao_estruturada/20192_166/Bimestral2_166_20192/Parte_1/mikael166/prova01.py | 224 | 3.59375 | 4 | n1=int(input("nota?"))
n2=int(input("nota?"))
n3=int(input("nota?"))
n4=int(input("nota?"))
media=int(input("media? "))
m_aluno=(n1+n2+n3+n4)/4
if media and m_aluno >= 7:
print('aprovado')
else:
print('reprovado') |
b25989f7358daf4ac3813f19a9aaf9f065fc0c44 | rogeriosilva-ifpi/teaching-tds-course | /programacao_estruturada/20192_186/Bimestral1_186_20192/ANTONIO_FRANCISCO_OLIVEIRA___EDRAS/negativo_para.py | 218 | 4.21875 | 4 | numero = int(input('Digite um numero'))
contador1 = 1
while (numero > 0):
contador = numero
contador1 = contador1 + 1
numero = int(input('Digite o próximo numero'))
print(contador, contator/contador1)
|
3999f567d735342b08005c502763f91a0ffe0882 | rogeriosilva-ifpi/teaching-tds-course | /programacao_estruturada/20192_186/cap3_funcoes/hello_funcoes1.py | 227 | 3.671875 | 4 | def potencia(numero, expoente):
resultado = numero ** expoente
return resultado
valor = int(input('Valor: '))
exp = int(input('Expoente: '))
retorno = potencia(valor, exp)
print(valor, 'elevado a', exp, '=', retorno)
|
92dae4bd0bb73c4e7c4b45c12cc63750ffed762d | rogeriosilva-ifpi/teaching-tds-course | /programacao_estruturada/20192_186/Bimestral1_186_20192/JESSEALANDA/questao6.py | 244 | 3.96875 | 4 | # sexta QUESTÃO
numero = int(input('digite um numero'))
contador = 1
soma = 0
while numero > 0:
numero = int(input('digite outro numero'))
contador = contador + 1
soma = soma + numero
media = soma / contador
print(soma, media)
|
5ef9623488605ed05c3f1942b0d689c646242fe0 | rogeriosilva-ifpi/teaching-tds-course | /programacao_estruturada/20192_166/Bimestral2_166_20192/Parte_2/Wemerson_TDS_166/questao3.py | 465 | 3.90625 | 4 | def futebol():
partidas = int(input('Digite o numero de partidas: '))
pontos_total = 0
v = 3
e = 1
for i in range(partidas):
valor_partida = input('Valor de cada partida: ')
if valor_partida == 'v':
pontos_total = pontos_total + 3
elif valor_partida == 'e':... |
0b81a4db055ddbaafc06e980145a2b4e5aa7d07a | rogeriosilva-ifpi/teaching-tds-course | /programacao_estruturada/20192_166/Bimestral2_166_20192/Parte_1/Wemerson TDS 166/questao4.py | 327 | 3.5625 | 4 | def lanchonet():
codigo = int(input('Digite o codigo: '))
if codigo == 1:
print('Cachorro Quente')
if codigo == 2:
print('X-Salada')
if codigo == 3:
print('X-Bacon')
if codigo == 4:
print('Torrada Simples')
if codigo == 5:
print('Refrigerante')
lanc... |
bf23eaa10164eeb644c4514e042f48fd3e78d54d | rogeriosilva-ifpi/teaching-tds-course | /programacao_estruturada/20192_166/Bimestral2_166_20192/Parte_2/Wemerson_TDS_166/questao1.py | 364 | 3.875 | 4 | corrida = int(input('Quantas corridas você fez no dia: '))
total = 0
for i in range(corrida):
valor = float(input('Qual o valor das corridas: '))
total += corrida
valor_uber = total * (25/100)
valor_motorista = total - valor_uber
print('Valor Total: ', total)
print('Valor do Uber: ', valor_uber)
print('Valor... |
2ad8b347e70f22a39e5c34b3cb0b056ecb4c8ac7 | rogeriosilva-ifpi/teaching-tds-course | /programacao_estruturada/20192_186/Bimestral1_186_20192/provaAdailton/q4.py | 245 | 3.734375 | 4 | # feito
def programa():
altura = float(input('Digite o valor da altura do triangulo: '))
base = float(input('Digite o valor da base do triangulo: '))
area = (base*altura) / 2
print('A area do triangulo é ', area)
programa()
|
a6a206402f8982b879c020a71590ee2a69dd643b | rogeriosilva-ifpi/teaching-tds-course | /programacao_estruturada/20192_186/Bimestral2_186_20192/Parte 1/2° Prova - Luciano Oliveira/1questao.py | 247 | 3.875 | 4 | def corrida():
numero = int(input("Digite quantas corridas voce fez no dia: "))
soma = 0
for l in numero:
corrida = int(input("Digite o valor da corrida:"))
soma = soma + corrida
print(soma)
corrida()
|
da2f5cac61cf83688130e87f1eabbdee71863769 | rogeriosilva-ifpi/teaching-tds-course | /programacao_estruturada/20192_186/Bimestral1_186_20192/ sandyejunior186/atv01.py | 582 | 3.96875 | 4 | kg = float(input('digite o seu peso/kg:'))
m = float(input('digite sua altura/m:'))
resultado = kg/m**2
print('seu imc é:', resultado)
if resultado < 17:
print('Muito abaixo do peso')
if resultado >= 17 and resultado <= 18.49:
print('Abaixo do peso')
if resultado >= 18.5 and resultado <= 24.99:
print('Peso ... |
b70e9c13c3e591424d0346f6ffb2887fa06f395b | rogeriosilva-ifpi/teaching-tds-course | /programacao_estruturada/20192_166/Bimestral2_166_20192/resolucao/futebol.py | 424 | 3.65625 | 4 | def programa():
qtd_partidas = int(input('Quantas partidas: '))
pontos = 0
for i in range(qtd_partidas):
resultado = input('Resultado "v", "d" ou "e": ')
if resultado == 'v':
pontos = pontos + 3
elif resultado == 'e':
pontos = pontos + 1
elif resultad... |
b40164c8944d6fe1606934539b8f88ca28549a83 | rogeriosilva-ifpi/teaching-tds-course | /programacao_estruturada/20192_166/Bimestral2_166_20192/Parte_1/willian moraes luis prova/quetao_1.py | 419 | 3.984375 | 4 | def main():
nota1 = float(input("digite a nota1: "))
nota2 = float(input('digite a nota2:'))
nota3 = float(input('digite a nota3:'))
nota4 = float(input('digite a nota4:'))
media = float(input('qual a media da sua escola?: '))
todas_notas = (nota1 + nota2 + nota3 + nota4)
if todas_notas >= m... |
ba8b369f03b5598c9a186337c6cfd4c7469fbdc2 | rogeriosilva-ifpi/teaching-tds-course | /programacao_estruturada/20192_186/Bimestral2_186_20192/Parte 2/rosa/Q01.py | 345 | 3.734375 | 4 |
n = int(input('qual a media anual da sua escola: '))
a = int(input('qual sua nota 1: '))
b = int(input('qual sua nota 2: '))
c = int(input('qual sua nota 3: '))
d = int(input('qual sua nota 4: '))
soma = (a + b + c + d)-n
def media_anual():
if soma < 0:
print ('aluno reprovado')
else:
print (... |
83642d76e837ed95432097141733a9e64bc175eb | rogeriosilva-ifpi/teaching-tds-course | /programacao_estruturada/20192_166/cap7_iteracoes/countdown.py | 227 | 3.984375 | 4 | import time
def programa():
numero = int(input('Número: '))
while numero >= 0:
print(f'>> {numero}')
numero = numero - 1
time.sleep(0.3)
print('Fim por fim feito por mim!')
programa()
|
3e55f970dd1e143a621c27fc7b60b7ee347a95ed | rogeriosilva-ifpi/teaching-tds-course | /programacao_estruturada/20192_166/Bimestral1_166_20192/resolucao-professor/numeros2.py | 872 | 3.796875 | 4 | def principal():
qtd = int(input('Quantos números a digitar?'))
contador = 0
cont_pares = 0
cont_impares = 0
cont_primos = 0
while contador < qtd:
numero = int(input('Número: '))
# se é PAR ou IMPAR
if numero % 2 == 0:
cont_pares = cont_pares + 1
else... |
97626ad56084904e2289077e801359e09d1fc964 | rogeriosilva-ifpi/teaching-tds-course | /programacao_estruturada/20192_166/Bimestral1_166_20192/felipe craveiro portela/prova_do_rogerio.py | 625 | 3.875 | 4 | def programa():
peso = float(input('peso da pessoa: '))
altura = float(input('altura da pessoa: '))
IMC = peso/altura**2
print('o imc da pessoa e',IMC)
if IMC < 17:
print('muito abaixo do peso')
elif IMC < 17 or IMC < 18.49:
print('abaixo do peso')
elif 24.99 > IMC or... |
c769d402caf41fa08d1e2e1f814d56da70c43dda | rogeriosilva-ifpi/teaching-tds-course | /programacao_estruturada/20192_186/Bimestral1_186_20192/resolucao-professor/numeros.py | 354 | 3.828125 | 4 | def principal():
numero = int(input('Número: '))
contador = 0
somatorio = 0
while numero > 0:
contador = contador + 1
somatorio = somatorio + numero
numero = int(input('Número: '))
print(f'Somatório igual a {somatorio}')
media = somatorio / contador
print(f'Média ig... |
a9e49a3eaf066e352962dc5dbbc5f9e62cb98a41 | rogeriosilva-ifpi/teaching-tds-course | /programacao_estruturada/20192_186/harife.py | 150 | 3.734375 | 4 | # entrada
a = int(input('Valor a: '))
b = int(input('Valor b: '))
# processamento
soma_dos_valores = a + b
# saida
print('Soma:', soma_dos_valores)
|
c72e3b9f2f93e8302c4ea3b3f6c66bc10261c36b | rogeriosilva-ifpi/teaching-tds-course | /programacao_estruturada/20192_186/soma_cdu.py | 363 | 3.765625 | 4 | # entrada
numero = int(input('Numero: '))
# processamento
centenas = numero // 100
dezenas = (numero % 100) // 10
unidades = (numero % 100) % 10
somatorio = centenas + dezenas + unidades
inverso = unidades*100 + dezenas*10 + centenas
# saida
print('C:', centenas)
print('D:', dezenas)
print('U:', unidades)
print('Som... |
b3ded90a24b501fa6ec6d5ae3b34c04d4d44ca6d | rogeriosilva-ifpi/teaching-tds-course | /programacao_estruturada/20192_186/Bimestral1_186_20192/provaAdailton/q6.py | 389 | 4.09375 | 4 | # feita
def programa():
num = float(input('Digite um numero: '))
contador = 0
somatorio = 0
while num > 0:
somatorio = somatorio + num
contador = contador + 1
num = int(input('Digite um numero: '))
media = (somatorio / contador)
print('A soma é ', somatorio)
print('A... |
dd3cd2e9fa27d43bf2f24e80901414b811f99353 | rogeriosilva-ifpi/teaching-tds-course | /programacao_estruturada/20192_166/Bimestral1_166_20192/rogerio_Luis_166./questao1.py | 682 | 3.9375 | 4 |
def programa():
peso = float(input('Digite seu peso:'))
altura = float(input('Digite sua altura:'))
peso = peso / (altura ** 2)
if peso <= 17:
print("Muito abaixo do peso", "seu peso é ", peso)
elif peso <= 18.49:
print("Abaixo do peso""seu peso é ", peso)
elif peso <= 24.99:
... |
ed8de6e20d45921ae2ca117c034760f815247492 | rogeriosilva-ifpi/teaching-tds-course | /programacao_estruturada/20192_186/Bimestral2_186_20192/Parte 2/Jeozadaque186/q2.py | 339 | 3.921875 | 4 | def main():
senha = input("Digite a senha:")
tamanho_senha = len(senha)
for c in senha:
if senha >= 8:
def he_maiuscula(c):
for ord(c) in range(32, 91):
print(c, chr(c))
def he_minuscula(c):
for ord(c) in range(92, 123):
print(c, chr(c))
print("SEGUR... |
d7072fff1f36ab27d8bcd627e10bd0eca8ac0bc2 | rogeriosilva-ifpi/teaching-tds-course | /programacao_estruturada/20192_166/Bimestral2_166_20192/Parte_2/bruno166tds/questao4.py | 181 | 3.53125 | 4 | def man():
palavra1 = input('digite a 1º palavra: ')
palavra2 = input('digite a 2º palavra: ')
palavra3 = input('digte a 3º palavra: ')
if nome1 == 'vertebrado':
|
a0dd02c656f69843ff376d79a40d023f58cae811 | rogeriosilva-ifpi/teaching-tds-course | /programacao_estruturada/20192_186/cap8_string/contar_vogais_consoantes.py | 1,036 | 3.765625 | 4 | # 6. Dada uma sequência de caracteres, determinar quantas vogais
# e quantas consoantes aparecem na sequência.
# Considere apenas os caracteres ASCII de 65 a 90 e de 97 a 122.
# Dica: se um caractere não é vogal então ele é consoante.
def main():
sequencia = input('Digite uma frase: ')
contador_vogal = ... |
0fd90ea85d44035e77ebee1ced72c94a67e6032e | rogeriosilva-ifpi/teaching-tds-course | /programacao_estruturada/20192_186/Bimestral2_186_20192/Parte 1/Roberto turma 186/frase.py | 375 | 3.765625 | 4 | def programa():
frase=str(input('frase: '))
n_frase=' '
for l in frase:
if eh_numero(frase):
n_frase+='@'
elif eh_vogal(frase):
n_frase+=chr(ord(l)-32)
print(n_frase)
def eh_numero(frase):
if 'l' in '1234567890':
return True
def eh_vogal(frase):
i... |
bb4af00654112c017a8d5d53a7e9d580d87e741c | rogeriosilva-ifpi/teaching-tds-course | /programacao_estruturada/20192_166/Bimestral2_166_20192/Parte_2/Clara_166/quest2.py | 263 | 4.03125 | 4 | frase = int(input('Digite frase: '))
nova_frase = ''
num = '1''2''3''4''5''6''7''8''9''0'
vogais = 'A''E''I''O''U'
if frase == num:
print(@)
elif frase != letra or num:
print(nova_frase)
elif frase == vogais:
print(frase + nova_frase)
else:
print(frase)
|
699f2ae469ea7663b81cb78fd05d362a3cccef0a | rogeriosilva-ifpi/teaching-tds-course | /programacao_estruturada/20192_166/conversor_velocidade.py | 171 | 3.765625 | 4 | # entrada
velocidade_ms = float(input('Velocidade em m/s: '))
# processamento
velocidade_kmh = velocidade_ms * 3.6
# saida
print('Velocidade em km/h: ', velocidade_kmh)
|
a234e8157d77a7ce5fc81bc6c737e7a9dce74b8f | rogeriosilva-ifpi/teaching-tds-course | /programacao_estruturada/20192_166/Bimestral2_166_20192/Parte_2/cleyson-TDS.166/questão-1°.py | 471 | 3.921875 | 4 | def main():
corridas = int(input("digite a quantidade de voltas: "))
total = 0
for i in range(corridas):
preço = float(input("digite o valor da corrida: "))
total = total + preço
print("preço total:",total)
por = total/100
uber = por*25
motorista = por*7... |
b9cfd5a48c69fa9a3b15436979d42ec436b8b0b5 | rogeriosilva-ifpi/teaching-tds-course | /programacao_estruturada/20192_186/cap7_iteracao/menu.py | 882 | 3.8125 | 4 | import os
def programa():
num1 = int(input('Número 1 >>> '))
num2 = int(input('Número 2 >>> '))
nome_programa = '\n ** *** MENU ** ***\n'
menu = nome_programa + '1 - Soma\n2 - Diferença\n3 - Produto\n\n0 - Sair\n>>> '
opcao = int(input(menu))
while opcao != 0:
if opcao == 1:
... |
040ec8f72d9142c4a362d819125a8ca70692d372 | rogeriosilva-ifpi/teaching-tds-course | /programacao_estruturada/20192_186/Bimestral2_186_20192/Parte 2/JOSÉ OLIVEIRA NETO e ANTÔNIO FRANCISCO OLIVEIRA/questao_03.py | 643 | 3.875 | 4 | valor = float(input('digite o vallor do veiculo'))
ano = int(input('Digite o ano do veículo'))
desconto = 0
def programa():
print('O valor do IPVA é: ', valor*0.025)
print('O valor do desconto é: ', porcentagem(valor,ano))
print('O valor do IPVA agora é: ', valor*0.025 - desconto)
#print(porcentagem()... |
d5fbd28a1884da452cbe89fa175970793afd4de3 | rogeriosilva-ifpi/teaching-tds-course | /programacao_estruturada/20192_186/Bimestral1_186_20192/Avaliação Programação - Herbert, Matthaus, Moisés - Turma 186/numeros2.py | 924 | 4 | 4 | def teste(numero):
if numero == 2:
return "par_primo"
elif numero == 3 or numero == 5:
return "primo"
elif (numero % 2 != 0) and (numero % 3 != 0) and (numero % 5 != 0):
return "primo"
elif numero % 2 == 0:
return "par"
else:
return "impar"
quantidade = int(... |
9e361990b86a9612c2d93993ecbc42ceda71e6d0 | rogeriosilva-ifpi/teaching-tds-course | /programacao_estruturada/20192_166/Bimestral2_166_20192/Parte_1/bruno166tds/questão4.py | 652 | 3.71875 | 4 | def lanchonete():
print('ola meu amigo')
código_do_produto = int(input('digite o código do produto desejado'))
while código_do_produto != 0:
if código_do_produto == 1:
print('você deve pagar o total de: R$ 4.00')
elif código_do_produto == 2:
print('valor da conta: R$ ... |
fcef4aa9612925c26f68e6bf4b4640815c19d38e | rogeriosilva-ifpi/teaching-tds-course | /programacao_estruturada/20192_186/Bimestral2_186_20192/Parte 2/roberto 186/lanchonete.py | 857 | 3.859375 | 4 | def programa():
while True:
codigo=int(input('codigo do produto:[1/2/3/4/5] '))
cachorro_quente=2
x_salada=4.5
x_bacon=5
torrada_simples=2
refrigerante=1.5
soma=c=0
if codigo == 1:
produto=cachorro_quente
el... |
15ea7fcc865974a20e1566e25682ff4e7e9f6ff9 | rogeriosilva-ifpi/teaching-tds-course | /programacao_estruturada/20192_166/cap8_string/demonstracao.py | 269 | 3.625 | 4 | def programa():
# alunos = ['Maria', 'Laiane', 'Iara']
# notas = [4.6, 9.7, 5.5, 8, 10, 1.0]
nome = input('Qual seu nome? ')
# a = alunos[0]
# for letra in nome:
# print(letra)
tam = len(nome)
print('Tamanho:', tam)
programa()
|
6b268d6365e33e90ca06a88d4b93499822bc9eb0 | rogeriosilva-ifpi/teaching-tds-course | /programacao_estruturada/20192_166/Bimestral1_166_20192/Lucas_Lisboa_166/questão_1.py | 647 | 3.9375 | 4 | def programa():
peso = float(input("Informe seu peso em quilograma:"))
altura = float(input("Informe sua altura em metros:"))
x = altura * altura
imc = peso / x
if imc < 17:
print("Muito abaixo do peso")
elif imc >= 17 and imc <= 18.49:
print("Abaixo do peso")
elif imc >= 1... |
625762cceffd32458c37d64b892c33fafb5d87b8 | rogeriosilva-ifpi/teaching-tds-course | /programacao_estruturada/20192_166/Bimestral1_166_20192/JABES_166/jabesq05.py | 357 | 4.03125 | 4 | angulo = float(input('digite o angulo : '))
if angulo < 90 and angulo > 0:
print(' Primeiro quadrante')
elif angulo > 90 and angulo < 180:
print(' Segundo quadrante')
elif angulo > 180 and angulo < 270:
print('Terceiro quadrante')
elif angulo > 270 and angulo < 306:
print('Quarto quadrante')
else:
... |
67014c4fdd28ce664b25896dd6677df74cdc83ba | rogeriosilva-ifpi/teaching-tds-course | /programacao_estruturada/20192_166/Bimestral2_166_20192/Parte_2/NAELY.166/q1.py | 507 | 3.828125 | 4 | def programa():
quantidades_corridas = int(input('quantidades de corridas no dia: '))
valor_corrida = 0
for i in range(quantidades_corridas):
valor_corrida = float(input('diga o valor da corrida: '))
valor_total = quantidades_corridas * (valor_corrida + valor_corrida)
valor_a... |
455bf2adf6d63192bf069f11d5167fcffd8592d4 | rogeriosilva-ifpi/teaching-tds-course | /programacao_estruturada/20192_186/cap5_condicionais/salario.py | 378 | 3.84375 | 4 | def programa():
salario1 = float(input('Salario Fernando: '))
salario2 = float(input('Salario Rogerio : '))
if salario1 >= salario2:
print('Fernando é Rico bem novim!!')
print('Muito bem.')
else:
print('Dirija-se a uma loteria. Pague seu talao!')
print('Faca um joguinho ... |
0e704a2a55c9e5385fe8629bf8951a4746839574 | rogeriosilva-ifpi/teaching-tds-course | /programacao_estruturada/20192_166/volume_circunferencia.py | 127 | 3.546875 | 4 | # entrada
raio = int(input('Raio: '))
# processamento
pi = 3.14
volume = (4 * pi * raio) / 3
# saida
print('Volume:', volume) |
ff15daa01b551be8c06b8a1f7b82cd7f426643f9 | rogeriosilva-ifpi/teaching-tds-course | /programacao_estruturada/20192_186/Bimestral1_186_20192/Rogerio_186_kaylla e jonathan/prova186.py | 647 | 3.765625 | 4 |
def programa():
peso = float(input('informe seu peso:'))
altura = float(input('informe sua altura:'))
IMC = peso / (altura*altura)
if IMC < 17:
print('muito abaixo do peso')
elif IMC <= 18.49:
print('seu IMC é:', IMC, 'abaixo do peso')
elif IMC <= 24.99:
print('seu IMC... |
bcaf01202d5dc73e53cd4e21a76b8acd0a339668 | rogeriosilva-ifpi/teaching-tds-course | /programacao_estruturada/20192_186/Bimestral1_186_20192/Avaliação Programação - Herbert, Matthaus, Moisés - Turma 186/carro.py | 287 | 3.640625 | 4 | custo_fabrica = float(input("Digite o custo de fábrica do carro, em reais: "))
percentagem_distribuidor = custo_fabrica * 0.28
impostos = custo_fabrica * 0.45
custo_total = custo_fabrica + percentagem_distribuidor + impostos
print("O custo ao consumidor será: R$ %d" % custo_total)
|
9eadeb69be586d5d74572f79a6a4a01b872720f3 | rogeriosilva-ifpi/teaching-tds-course | /programacao_estruturada/20192_166/resolucao_prova_final/social.py | 1,640 | 3.625 | 4 | def main():
qtd_familias = int(input('Quantas familias: '))
renda_total = 0
contador_familia_bolsa_social = 0
contador_pessoas = 0
contador_fem = 0
contador_mas = 0
for i in range(qtd_familias):
print('>>> Familia', i)
qtd_pessoas = int(input('Quantas pessoas: '))
co... |
a42a39961119c154485c974de40b72a8abd19de2 | rogeriosilva-ifpi/teaching-tds-course | /programacao_estruturada/20192_186/Bimestral2_186_20192/Parte 2/harife-186/2questao.py | 1,285 | 4 | 4 | senha = input("coloque uma senha: ")
def tamanho():
if len(i) == range(8):
return True
else:
return False
def maiuscula():
if ord(i) in range(65,90):
return True
else:
return False
def miniscula():
if ord(i) in range(97, 122):
return True
else:
... |
edd06834320697ac884f503a1dc4c756443aa72b | rogeriosilva-ifpi/teaching-tds-course | /programacao_estruturada/20192_186/Bimestral1_186_20192/FRANCISCO ROBERTO E REGINALDO JOSE - TURMA 186N/angulo.py | 412 | 4.125 | 4 | print('Qual o quadrante do angulo?')
# entrada
angulo = float(input('Digite o valor do angulo entre 0° e 360°: '))
# processamento
if angulo < 90:
print('este angulo percente ao 1° quadrante')
elif 90 < angulo < 180:
print('este angulo percente ao 2° quadrante')
elif 180 < angulo < 270:
print('este angul... |
9abe962b1938a413b9afb8683475133b4ea8f6fb | rogeriosilva-ifpi/teaching-tds-course | /programacao_estruturada/20192_186/cap8_string/buscar_nomes.py | 229 | 4.0625 | 4 | def programa():
nomes = ['Maria da Silva', 'Joaquim jose',
'Luis da Silva', 'Maria Teresa', 'Silva Jr']
chave = input('Busca ... ').upper()
for nome in nomes:
if chave in nome.upper():
print(nome)
programa()
|
b49e027a1ed9418ba18d4d4e337029b79f32f42b | rogeriosilva-ifpi/teaching-tds-course | /programacao_estruturada/20192_166/Bimestral1_166_20192/rogerio_Luis_166/questao4.py | 177 | 3.625 | 4 | def programa():
base = int(input('Digite a base:'))
altura = int(input('Digite a altura:'))
area = (base * altura / 2)
print("Sua area é", area)
programa()
|
15735ddc18df58f177f6365e46748fd93572eeea | rogeriosilva-ifpi/teaching-tds-course | /programacao_estruturada/20192_166/Bimestral1_166_20192/wilames_Renato_Izequiel-166/custo_consumidor 3º.py | 232 | 3.703125 | 4 | def programa():
custo = float(input('digite o custo de fabrica'))
distribuido = ((45/100)*custo)
inposto = ((28/100)*custo)
valor = custo + distribuido + inposto
print('esse e o valor final', valor)
programa()
|
428c4e5f0c78217bda609d522844d911b6e7e1ef | rogeriosilva-ifpi/teaching-tds-course | /programacao_estruturada/20192_166/Bimestral2_166_20192/Parte_2/willianmoraes luis TDS_166/questao_03.py | 373 | 3.859375 | 4 | def main():
partidas = int(input('digite o total de partidas:'))
v = 0
e = 0
for i in range(0, partidas):
jogos = input('foi v/e:>>')
if jogos == 'v':
v += 3
elif jogos == 'e':
e += 1
print('a soma dos pontos de vitoria é {}'.format(v))
print('a... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.