blob_id string | repo_name string | path string | length_bytes int64 | score float64 | int_score int64 | text string | is_english bool |
|---|---|---|---|---|---|---|---|
224b5e89e34fd67a481f08faebea9b88e663360d | ZorkinMaxim/Extra_HomeWork | /DZ_Palindrome.py | 487 | 4.15625 | 4 | # Detect Palindrome
# Запросить ввод числа. Определить является ли введенное число полиндромом или нет.
number = int(input('Enter a number'))
reversed_number = 0
tmp_original = number
while tmp_original > 0:
reversed_number = (reversed_number * 10) + tmp_original % 10
tmp_original = tmp_original //... | false |
378e0b3f129230aae31b144ab00fe46aa123b537 | Habits11/Python-Programs | /name_order.py | 953 | 4.15625 | 4 | # name_order.py
# A program to reorder a person's name
# Author: Tyler McCreary
def main():
name = input("Input the name to be reordered: ")
spaces = name.find(" ")
if spaces <= 0:
print("invalid name")
else:
first = name[:spaces]
name = name[spaces + 1:]
spaces = name.f... | true |
4be0db806d1d5c32ec0cd72121bf8cc9d7244de2 | jlh040/Python-data-structures-exercise | /25_sum_pairs/sum_pairs.py | 1,221 | 4.1875 | 4 | def sum_pairs(nums, goal):
"""Return tuple of first pair of nums that sum to goal.
For example:
>>> sum_pairs([1, 2, 2, 10], 4)
(2, 2)
(4, 2) sum to 6, and come before (5, 1):
>>> sum_pairs([4, 2, 10, 5, 1], 6) # (4, 2)
(4, 2)
(4, 3) sum to 7, and finish before (5, 2... | true |
12f3523d3f7a30ff50d9da6df502f8d6b0274417 | BhanuPrakashNani/Competitive_coding | /HackerRank/Intro to Conditional Statements.py | 311 | 4.21875 | 4 | # https://www.hackerrank.com/challenges/30-conditional-statements
# Day 3: Intro to Conditional Statements
N = int(raw_input().strip())
if N%2 != 0:
print "Weird"
else:
if (N>=2 and N<=5):
print "Not Weird"
elif (N>=6 and N<=20):
print "Weird"
else:
print "Not Weird"
| false |
31a7fa16633f116e153c16ac3c4f588786976335 | annjose/LearningPython | /intro/user_inputs.py | 1,072 | 4.15625 | 4 |
students = []
def add_student(name, age=15):
student = {
"name": name,
"age": age
}
students.append(student)
print(f"Added new student with name '{name}' and age '{age}'")
def my_print(name, age, *args):
print("name =", name, "age =", age)
print(args)
my_print("Liza", 14, "a"... | true |
12f15e48bea02f0dd5381fd7d87162dda1a74a40 | PaytonPengWang/python-learning | /005_money_challenge_v3.0.py | 851 | 4.125 | 4 | """
作者:王鹏
功能:52周存钱挑战
日期:1/1/2019
v2.0 新增:记录每周的存款数
使用for语句可以便利整个序列的内容
for <x> in <list1>:
<body>
range(n) 返回一个可迭代的对象
list(range(n))将迭代类型转换为list
for i in range(10)
print(i) // 0 ... 9
"""
import math
def main():
INCREASE_MONEY = 10
TOTAL_WEEK = 52... | false |
c870a976dc18743a569ce70de71f3128f0ed7339 | ductandev/Tkinter_GUI_tutorial | /may_tinh.py | 2,951 | 4.125 | 4 | from tkinter import *
root = Tk()
root.title("Công cụ tính toán")
def button_click(number):
current=e.get()
e.delete(0,END)
e.insert(0,str(current)+str(number))
def button_clear():
e.delete(0,END)
def button_add():
first_number=e.get()
global f_num
global math
math = "addition"
f_num=int(first_number)
e.de... | false |
30d6f3239d45955065ac72e17493067cd6bae523 | KilnDR/Python-2021 | /hello.py | 1,170 | 4.625 | 5 | #################################
# Learn Python Coding in 2021
# By Dave Roberts
# Codemy.com
#################################
import os
os.system('clear')
# Print Hello World to screen comment note hashtag to identity comment
#print ("Hello World!") # This is another comment
''' 3 single quotation marks allows mul... | true |
1d5317da7e87f3e9b4a1241a532b1d04ea932ac7 | nathanlo99/dmoj_archive | /done/ccc12j1.py | 342 | 4.15625 | 4 | limit = int(input())
speed = int(input())
if speed - limit >= 31:
print("You are speeding and your fine is $500.")
elif speed - limit >= 21:
print("You are speeding and your fine is $270.")
elif speed - limit >= 1:
print("You are speeding and your fine is $100.")
else:
print("Congratulations, you are wit... | true |
5cad256220ce09a80b48be9a2f583df1d73dfd01 | AmirBalti2/Python-Basic | /test3.py | 570 | 4.21875 | 4 | """Task
Given an integer,n , perform the following conditional actions:
If n is odd, print Weird
If n is even and in the inclusive range of 2 to 5, print Not Weird
If n is even and in the inclusive range of 6 to 20, print Weird
If n is even and greater than 20, print Not Weird"""
import math
import os
impor... | false |
81f79215a0eb1e822e2bec641c6f5603e0e75dcc | kwakinator/DojoAssignments | /Python/Basic_Python/multsumavg.py | 684 | 4.4375 | 4 | ##Multiples
##Part I - Write code that prints all the odd numbers from 1 to 1000. Use the for loop and don't use a list to do this exercise.
for num in range(0,1001):
if num %2 != 0:
print num
num +=1
##Part II - Create another program that prints all the multiples of 5 from 5 to 1,000,000.
for num... | true |
5652e61cf8c50f36e5361ac5c87d0b466aea7f4c | kuljotbiring/Python | /pythonlearn/nameCases.py | 202 | 4.15625 | 4 | # Use a variable to represent a person’s name, and then print
# that person’s name in lowercase, uppercase, and title case.
name = "kuljot biring"
print(f"{name.lower()}\n{name.upper()}\n{name.title()}")
| true |
d49bace7590233647b762d83d4e9da6ef4f38296 | kuljotbiring/Python | /pythonlearn/dice_import.py | 899 | 4.125 | 4 | # Make a class Die with one attribute called sides, which has a default
# value of 6. Write a method called roll_die() that prints a random number
# between 1 and the number of sides the die has. Make a 6-sided die and roll it
# 10 times.
from random import randint
class Dice:
""" create a dice object and insta... | true |
28c139b9c1d115115ed01f6395abc373b672051b | kuljotbiring/Python | /pythonlearn/gradeWithFunction.py | 886 | 4.59375 | 5 | # Rewrite the grade program from the previous chapter using
# a function called computegrade that takes a score as its parameter and
# returns a grade as a string.
# Write a program to prompt for a score between 0.0 and
# 1.0. If the score is out of range, print an error message. If the score is
# between 0.0 and 1.0, ... | true |
a8ce3b82c6b689f58ad53a7fe9b73569b81745fa | kuljotbiring/Python | /pythonlearn/whilesandwich.py | 805 | 4.34375 | 4 | # Make a list called sandwich_orders and fill it with the names of various
# sandwiches.
sandwich_orders = ['BLT', 'chicken', 'pastrami', 'veggie', 'tuna', 'california', 'turkey']
# Then make an empty list called finished_sandwiches.
finished_sandwiches = []
# Loop through the list of sandwich orders and print a mess... | true |
0804bc2f3e61597193b2181ec42291881dc7249b | kuljotbiring/Python | /pythonlearn/dictionary_in_list.py | 972 | 4.53125 | 5 | # Start with the program you wrote for Exercise 6-1 (page 99).
tesla = {
'first_name': 'elon',
'last_name': 'musk',
'age': 45,
'city': 'los angeles',
}
# Make two new dictionaries representing different people, and store all three
# dictionaries in a list called people. Loop through your list of pe... | false |
5cced076bde9478592432ad305fa6ea00bda7797 | csduarte/FunPy | /kboparai1/ex15/sd01.py | 594 | 4.15625 | 4 | # Importing module argv from sys
from sys import argv
# Taking in script name and file name for argv
script, filename = argv
# Opening filename, which was named when invoking the script.
txt = open(filename)
# Printing filename through format variable.
print "Here's your file %r:" % filename
# prints the content of the... | true |
8c240b4602fbdd0d064af941dc3ced8441d169cf | csduarte/FunPy | /kboparai1/ex03/sd05.py | 750 | 4.375 | 4 | print "I will now count my chickens:"
# dividing two numbers then adding 25
print "Hens", float(25+30/6)
# 100 - percentage
print "Roosters", float(100 - 25 * 3 % 4)
print "Now I will count the eggs:"
# Addition subtraction percentage division addition.
print float(3+2+1-5+4%2-1/4+6)
print "Is it true that 3+2<5... | true |
1a9e42255b8574ce236cf67c14769d7e8245830c | csduarte/FunPy | /kboparai1/ex03/sd01.py | 686 | 4.15625 | 4 | print "I will now count my chickens:"
# dividing two numbers then adding 25
print "Hens", 25+30/6
# 100 - percentage
print "Roosters", 100 - 25 * 3 % 4
print "Now I will count the eggs:"
# Addition subtraction percentage division addition.
print 3+2+1-5+4%2-1/4+6
print "Is it true that 3+2<5-7?"
# Running thru ... | true |
9fd4dd421b659260bdd30f0934880c2c1996898f | tomilashy/using-lists-in-python | /list comprehension.py | 552 | 4.15625 | 4 |
name = [1,2,3,4,5,6,7,8,9];
odd=[x for x in name if x%2!=0 ];
even=[x for x in name if x%2==0 ];
print (odd,even);
edit=[x if x%2==0 else x*2 for x in name ];
print (edit);
mixed="This is jesutomi";
vowels=', '.join(v for v in mixed if v in "aeiou");
print (vowels);
nested_list=[[1,2,3],[4,5,6],[7,8,9]];
print(... | true |
8119a571523a8cf2bb146033c274677ad94e2311 | malhotraguy/Finding-the-specific-letter | /Code.py | 435 | 4.1875 | 4 | cities = ["New York", "Shanghai", "Munich", "Tokyo", "Dubai", "Mexico City", "São Paulo", "Hyderabad"]
search_letter = input("Enter the letter you want to search: ")
total = 0
for city_name in cities:
total += city_name.lower().count(search_letter)
print("In",city_name,"there are:",city_name.lower().count(sear... | true |
4cc802d818f40279cae58017e80074eb14effc4c | izzitan/CP1404_practical | /prac_03/password_check.py | 630 | 4.125 | 4 | """
Name: Hafidz Izzi Baihaqi
GitHub: https://github.com/izzitan/CP1404_practical
"""
MIN_LENGTH = 4
def main():
password = get_password()
while not is_valid_password(password):
print("Invalid password")
password = get_password()
print("Password {} is valid".format(print_asterisk(passwor... | false |
6dc649fe5d64f037fe4ac0fa8acd49863efbb2ac | chemplife/Python | /python_core/function_args_kargs.py | 1,492 | 4.25 | 4 | # *args scoops the positional arguments into a Tuple.
# **kwargs scoops the Keyword arguments into a Dictionary.
def my_func0(a,b,*args):
print('my_func0')
print(f'a:{a}, b:{b}, args:{args}')
my_func0(10,20,30,40)
print('-------------------------------')
# '*args' takes all the left overs.
# To have anything after... | false |
69f2023e39b5ebfc7c87ba8b0beb524d19512311 | dotnet-tech/python-basics | /Operators/Operator_Overloading.py | 1,368 | 4.3125 | 4 | #Operator Overloading
print(1 + 2)
print("Python"+"is")
print(3 * 4)
print("Python"*4)
#output
'''
3
Pythonis
12
PythonPythonPythonPython
'''
class AddNumbers:
def __init__(self,a):
self.a =a
def __add__(self,b): #magic method (+ overloading)
return self.a + b.a ... | false |
34f3214dbc2f0e0c38b5a46972a9832782ee7b1f | Mat4wrk/Object-Oriented-Programming-in-Python-Datacamp | /1.OOP Fundamentals/Create your first class.py | 785 | 4.46875 | 4 | # Create an empty class Employee
class Employee:
pass
# Create an object emp of class Employee
emp = Employee()
# Include a set_name method
class Employee:
def set_name(self, new_name):
self.name = new_name
# Create an object emp of class Employee
emp = Employee()
# Use set_name() on emp to set ... | true |
e0504710ea499bd394004095ba27d8b0a24b5c46 | ajay0006/madPythonLabs | /Lab5/verticalDisplay.py | 815 | 4.15625 | 4 | # this code displays a vertical line across the gfx hat screen
from gfxhat import lcd
lcd.clear()
lcd.show()
# this is a function that takes the user input for the X coordinate and validates it, making sure it isnt above 127
# it also returns the users input
def verticalDisplayInput():
x = int(input("please ent... | true |
4a10a7ac84a121e134505038b4c4dbf00b7df0e4 | ericzacharia/MarkovSpeakerRecognition | /map.py | 2,162 | 4.625 | 5 | from abc import ABC, ABCMeta, abstractmethod
class Map(ABC):
"""
Map is an Abstract Base class that represents an symbol table
"""
@abstractmethod
def __getitem__(self,key):
"""
Similar to the __getitem__ method for a Python dictionary, this will
return the ... | true |
43d0a944eb575744d2010b5c7fba39af7e9d96c9 | Tiagosf00/sudoku-solver | /sudoku.py | 1,775 | 4.21875 | 4 | # Sudoku solver using backtrack recursion
# Example with an unique solution.
sudoku = [[5,3,0, 0,7,0, 0,0,0],
[6,0,0, 1,9,5, 0,0,0],
[0,9,8, 0,0,0, 0,6,0],
[8,0,0, 0,6,0, 0,0,3],
[4,0,0, 8,0,3, 0,0,1],
[7,0,0, 0,2,0, 0,0,6],
[0,6,0, 0,0,0, 2,8,0],
... | true |
2bba980041b15141739ced6c043ff60f0c0dfd62 | spidyxD/Markov-s_Theorem_Python | /Regla.py | 1,392 | 4.125 | 4 | class Regla:
"""""
def __init__(self,entrada,salida,esFinal,numero):
self.entrada = entrada
self.salida = salida
self.esFinal = esFinal
self.numero = numero
self.etiqueta = None
self.comentario = None
"""""
def __init__(self, entrada="", salida=""):
... | false |
c3928c896f07c49824ff603f33c236ce4be212da | nsridatta/SeleniumFrameworks | /DinoBot/src/test/stringfunctions.py | 871 | 4.40625 | 4 | from string import capwords
course = "Python for Programmers"
# capitalize method will capitalize only first letter in the sentence
print(course.capitalize())
for word in course.split():
print(word.capitalize(), sep=" ")
# capwords method of string library will capitalize first letter of the words in the sentenc... | true |
51f1b6efac3506ef4a9e4eaf5555f1074b1f21a9 | Fatmahmh/100daysofCodewithPython | /Day058.py | 563 | 4.40625 | 4 | #Python RegEx 2
#The findall() function returns a list containing all matches.
import re
txt = "the rain in spain"
x = re.findall("ai",txt)
print(x)
txt = "the rain in spain"
x = re.findall("pro",txt)
print(x)
if (x):
print("yes we have match")
else:
print("no match")
#The search() function sea... | true |
f2e342a56bb38695f1c3ce963a021259a0afe425 | Fatmahmh/100daysofCodewithPython | /Day017.py | 701 | 4.59375 | 5 | thistuple = ('apple ', 'bannana', 'orange', 'cherry')
print(thistuple)
#Check if Item Exists
if "orange" in thistuple:
print('yes , apple in this tuple')
#repeat an item in a tuple, use the * operator.
thistuple = ('python' , )*3
print(thistuple)
#+ Operator in Tuple uesd To add 2 tuples or more ... | true |
1a91c62922e98e6333eeff93d4202125096d7117 | Fatmahmh/100daysofCodewithPython | /Day011.py | 516 | 4.25 | 4 | # Logical Operators
x = 5
print(x > 5 or x < 4)
print(x > 5 and x < 4)
print(not x < 4)
#Identity Operators
''' if they are actually the same object, with the same memory location.'''
x = 5
y = 5
z = x
print(" ")
print(x is z )
print(x is not z )
print(x is y)
print(x != z )
print(x == z )
... | true |
4c99f91d6c7d84f01d4428665924c7c1c61d9697 | Fatmahmh/100daysofCodewithPython | /Day022.py | 732 | 4.71875 | 5 | #Dictionary
#Empty dictionary.
thisdict = {}
thisdict = {
"brand" : 'ford',
"model": "mustang",
"year" : 1996
}
print(thisdict)
print(thisdict["model"])
#Get the value of the key.
print(thisdict.get('model'))
#You can change the value of a specific item by referring to its key name.
th... | true |
eda1d6ef2c68ead27256742ce59d27fef1d71673 | Fatmahmh/100daysofCodewithPython | /Day020.py | 372 | 4.4375 | 4 | thisset = {}
print(thisset)
#Create a Set.
thisset = {'apple', 'cherry', ' banana'}
print(thisset)
#//
thisset = {'apple',1,2,1,5}
print(thisset)
for x in thisset:
print(x)
print("apple" in thisset)
#Add an item to a set, using the add() method.
thisset.add("orange")
print(thisset)
thisset... | true |
c6f5f3657072bbdce3289326fc9d1b50031e8f8e | Fatmahmh/100daysofCodewithPython | /Day030.py | 1,338 | 4.9375 | 5 | #Python Loops3 For Loop
'''The range() Function To loop through a set of code a specified number of times, we can use the range() function,
The range() function returns a sequence of numbers, starting from 0 by default, and increments by 1 (by default), and ends at a specified number.'''
for x in range(6):
pr... | true |
b09b258af455cf1bb4113e47b35de12055951f72 | MAPLE-Robot-Subgoaling/IPT | /data/HW3/hw3_235.py | 673 | 4.1875 | 4 | def main():
temp = int(input("Please enter in the temperature: "))
scale = input("Please enter what the temperature is measured in (use K or C): ")
if scale == "K":
if temp >= 373:
print("At this temperature, water is a gas")
elif temp <= 273:
print("At this temperat... | true |
a3b656dbacb035a707afa9a4c917bc40f13f3275 | MAPLE-Robot-Subgoaling/IPT | /data/HW3/hw3_440.py | 674 | 4.125 | 4 | def main():
temp = float(input("please enter the temperature: "))
form = input("please enter 'C' for celsius or 'K' for kelvin: ")
if(temp > 0) and ( temp < 100) and (form == "C"):
print("the water is a liquid.")
if(temp <= 0) and (form == "C"):
print("the water is frozen sol... | true |
25d878c1cd851bdaaddcf45b486b01685b0034b9 | MAPLE-Robot-Subgoaling/IPT | /data/HW4/hw4_149.py | 312 | 4.15625 | 4 | def main():
height= int(input("Please enter the starting height of the hailstone "))
while height >1:
if height % 2==0:
height = height//2
else:
height=(height*3) +1
print("Hail is currently at height", height)
print("Hail is stopped a height 1")
main()
| true |
6cca26f7f33f8153a78c53e83a1a578a02d1f37c | MAPLE-Robot-Subgoaling/IPT | /data/HW3/hw3_345.py | 717 | 4.125 | 4 | def main():
temp = float(input("Please enter the temperature: "))
tempType = input("Please enter 'C' for Celsius, or 'K' for Kelvin: ")
if (tempType == 'C'):
if (temp >= 100):
print("The water is gas at this temperature")
elif (temp >= 0):
print("The water is liquid a... | true |
863f0fe84be66041fef6e6038fbc8a3b2a64c85a | MAPLE-Robot-Subgoaling/IPT | /data/HW4/hw4_379.py | 584 | 4.25 | 4 | def main():
STOP = 1
height = int(input("Please enter the starting height of the hailstone: "))
while (height <=0):
print("The starting height must be a positive number greater than 0")
height = int(input(" Please enter the starting height of the hailstone: "))
while (height != STOP):
... | true |
d01b3b97b6cb07c3332001b023c128da8a1452c6 | MAPLE-Robot-Subgoaling/IPT | /data/HW5/hw5_229.py | 518 | 4.15625 | 4 | def main():
width = input("Please enter the width of the box: ")
width = int(width)
height = input("Please enter the height of the box: ")
height = int(height)
outline = input("Please enter a symbol for the box outline: ")
fill = input("Please enter symbol for the box to be filled with: ")
p... | true |
ebc0aed659e66bcee2937d0655a6102d87e680c8 | MAPLE-Robot-Subgoaling/IPT | /data/HW3/hw3_288.py | 665 | 4.125 | 4 | def main():
temp=float(input("Please enter the temperature: "))
unit=input("Please enter 'C' for Celcius, or 'K' for Kelvin: ")
if unit=="C":
if temp<=0:
print("At this temperature, water is a solid.")
elif temp>=100:
print("At this temperature, water is a gas.")
... | true |
12c854f625fc3fb346fba5b8999d821b8dcbf2c9 | MAPLE-Robot-Subgoaling/IPT | /data/HW4/hw4_133.py | 497 | 4.1875 | 4 | def main():
height = int(input("Enter a height for the hailstorm: "))
evenOdd = height % 2
while height != 1:
while evenOdd == 0:
height = int(height / 2)
evenOdd = height % 2
print("Hail is currently at height",height)
while evenOdd == 1 and height != 1:
... | false |
c13e7fa212cadac8a9e8490e02947e335a3efb80 | MAPLE-Robot-Subgoaling/IPT | /data/HW5/hw5_267.py | 396 | 4.1875 | 4 | def main():
width = int(input("Please enter a width: "))
height = int(input("Please enter a height: "))
symbol1 = input("Please enter a symbol: ")
symbol2 = input("Please enter a different symbol: ")
length = 0
print(symbol1*width)
for n in range(height - 2):
print(symbol1+(symbol2*(... | true |
8d66c21863dca0efbba1981f8958b208c0830359 | MAPLE-Robot-Subgoaling/IPT | /data/HW3/hw3_010.py | 1,039 | 4.125 | 4 | def main():
temp = float(input("Pleas enter the temperature:"))
scale = input("Please enter 'C' for Celsius, or 'K' for Kelvin:")
if scale == "C":
if temp <= 0:
print("At this temperature, water is a(frozen) solid.")
elif temp >= 100:
print("At this temperature, water... | true |
de0e4572ab2d9a4c45f884d3f7fa1dca8f71308c | MAPLE-Robot-Subgoaling/IPT | /data/HW5/hw5_016.py | 431 | 4.15625 | 4 | def main():
width = int(input("enter width of box "))
height = int(input("enter height of box "))
outline = input("enter a symbol for the outline of the box ")
fill = input("enter a symbol for the fill of the bod")
top = outline * width
print(top)
for i in range (0, height -2):
ins... | true |
04023bc7cb609f7b7f9078ebadae64321c80ed97 | MAPLE-Robot-Subgoaling/IPT | /data/HW3/hw3_264.py | 604 | 4.1875 | 4 | def main():
temp = float(input("What temperature would you like to test:"))
tempMode = input("Is this temperature in Kelvin or Celcius? Enter K or C:")
if temp <= 0 and tempMode == "C" or temp <= 273 and tempMode == "K":
print("At", str(temp) + tempMode, "water would be freezing.")
if 0 < temp <... | true |
90f7d12687698cfdd78085f0324bcca630cba0dc | MAPLE-Robot-Subgoaling/IPT | /data/HW3/hw3_119.py | 570 | 4.125 | 4 | temp = float(input("Please enter the temperature: "))
SI = input("Please enter 'C' for Celcius, or 'K' for Kelvin: ")
if SI == 'C' and temp > 100:
print("At this temperature, water is gas. ")
elif SI == 'C' and temp > 0:
print("At this temperature, water is liquid")
elif SI == 'C' and temp <= 0:
print("At t... | true |
32d08976d85268fcfeda8cc6bab3279a51445ef0 | MAPLE-Robot-Subgoaling/IPT | /data/HW4/hw4_019.py | 542 | 4.28125 | 4 | def main():
height=int(input("Please enter the height of the hail: "))
if height <= 1:
print("OOPS! You quit the program, gotta be greater than 1")
while height > 1:
even = height % 2
if even == 0:
if height >= 1:
print("The current height is ",height)
... | true |
911ed2d52c58f504bb68f5d95ab6b58163252451 | MAPLE-Robot-Subgoaling/IPT | /data/HW4/hw4_241.py | 379 | 4.125 | 4 | def main():
num = int(input("Please enter any positive number : "))
while num > 1:
if num == 1:
print ("Hail stopped at 1")
elif num % 2 == 0:
num = int(num/2)
print ("Hail is currently at :", num)
elif num % 2 == 1:
num = int((num * 3)+ 1)... | false |
eb7164e404106b0f9526a171840a92b9b4d52743 | MAPLE-Robot-Subgoaling/IPT | /data/HW3/hw3_379.py | 621 | 4.1875 | 4 | def main():
temp = float(input("What is the temperature? "))
scale = input("Enter C for Celsius or K for Kelvin: ")
if scale == "K" and temp <= 273:
print("The water is frozen solid")
elif scale == "K" and temp >= 273 and temp <=373:
print("The water is a liquid")
elif scale == "K" a... | true |
fa46a23d78b2908ac225f08cb51bde2278d97786 | MAPLE-Robot-Subgoaling/IPT | /data/HW4/hw4_118.py | 515 | 4.125 | 4 | def main():
posInt = int(input("Please enter a starting positive integer for height of the hailstone: "))
while (posInt != 1):
if (posInt % 2 == 0) and (posInt - 2 != 0):
posInt = posInt // 2
print("Hail is currently at height", posInt)
elif ((posInt % 2 == 1) and (posInt... | false |
8130491334db1ab5f6248f14e76e943fe204d846 | MAPLE-Robot-Subgoaling/IPT | /data/HW3/hw3_357.py | 882 | 4.125 | 4 | def main():
FREEZE_C = 0
BOIL_C = 100
FREEZE_K = 273
BOIL_K = 373
tempNum = float(input("Please enter the temperature: "))
tempMes = input("Please enter 'C' for Celsius, or 'K' for Kelvin: ")
if tempMes == "C" or tempMes == "c":
if tempNum <= FREEZE_C:
print("At this temp... | true |
f67cca03dedd3fabb5a608307249f2c99fbdde95 | MAPLE-Robot-Subgoaling/IPT | /data/HW4/hw4_065.py | 397 | 4.25 | 4 | def main():
startingHeight = int(input("Please enter the starting height of the hailstone:"))
while startingHeight != 1 :
if startingHeight % 2 == 0 :
startingHeight = startingHeight / 2
else :
startingHeight = (startingHeight * 3) + 1
print("Hail is currently at"... | true |
d2cd6298046986955ae30fb1e8ddac575067a41a | MAPLE-Robot-Subgoaling/IPT | /data/HW4/hw4_448.py | 267 | 4.125 | 4 | def main():
hail=int(input("Please enter the starting height of the hailstone: "))
while hail != 1:
if hail % 2 == 0:
hail = (hail/2)
print("",hail)
else:
hail = (hail*3)+1
print("",hail)
main()
| false |
b4a99812a7f88d70e240e4b0e8d0b5e7d1c1fdf5 | MAPLE-Robot-Subgoaling/IPT | /data/HW3/hw3_182.py | 748 | 4.15625 | 4 | def main():
userTemp = float(input("Please enter the temperature:"))
userScale = input("Please enter 'C' for Celsius, or 'K' for Kelvin:")
a = userTemp
if userScale == "C":
if a > 0 and a < 100:
print("At this temperature, water is a liquid.")
elif a <= 0:
print(... | true |
7fb3c53caf031fb4a7580440acbfc8f8811d65b7 | MAPLE-Robot-Subgoaling/IPT | /data/HW3/hw3_246.py | 581 | 4.375 | 4 | def main ():
inpTemp=float(input("What is the temperature?"))
unit=input("What is the unit? (you may either enter C for Celcius or K for Kelvin)")
if unit == "C":
temp=inpTemp
elif unit == "K":
temp=inpTemp-273
else:
print ("You did not enter a correct unit. Please either en... | true |
c443537f08867bc6ac762e6794ed4f2d6158635b | MAPLE-Robot-Subgoaling/IPT | /data/HW5/hw5_287.py | 479 | 4.15625 | 4 | def main():
width = int(input("Please enter the width of the box:"))
height= int(input("Please enter the height of the box:"))
outline_symbol = input("Please enter a symbol for the box outline:")
box_fill_symbol= input("Please enter a symbol for the box fill:")
print(outline_symbol* width)
for i... | true |
82b5935a8d2440bff62d12a0e950755951b034c8 | MAPLE-Robot-Subgoaling/IPT | /data/HW4/hw4_025.py | 404 | 4.21875 | 4 | def main():
hail=float(input("Please enter the starting height of the hailstone:"))
while hail!=1:
if (hail % 2)== 0:
hail= int(hail/2)
print("Hail is currently at height", hail)
elif (hail % 2)!=0:
hail= (hail*3)+1
print("Hail is currently a... | true |
9b6c849522778de47640b1e71dc28f13a81a6176 | MAPLE-Robot-Subgoaling/IPT | /data/HW5/hw5_356.py | 504 | 4.125 | 4 | def main():
width = int(input("Pease enter the width of the box: "))
height = int(input("Please enter the height of the box: "))
outline = input("Please enter the symbol for the box outline: ")
fill = input("Pease enter a symbol for the box fill: ")
if height != 1:
print(width *outline)
... | true |
5bafe79e853a4f1faf96a70b31f85709b0c3eba9 | MAPLE-Robot-Subgoaling/IPT | /data/HW3/hw3_391.py | 449 | 4.15625 | 4 | def main():
print()
temp = float(input("Please enter the temperature: "))
scale = input("Please enter the scale, C for Celsius or K for Kelvin: ")
if scale == "K":
temp = temp - 273.15
if temp <= 0:
print("At this temperature, water is frozen solid.")
elif temp < 100:
pr... | true |
0d8bec79312aa7cd3f9d43f5c607d0ab256f53d4 | MAPLE-Robot-Subgoaling/IPT | /data/HW5/hw5_290.py | 532 | 4.1875 | 4 | def main ():
width = int(input("What is the width of the box: "))
height = int(input("What is the height of the box: "))
boxOutline = input("What symbol do you want to use for the box's outline: ")
boxFill = input("What symbol do you want to use to fill the box: ")
upperLimit = height - 1
fillWi... | true |
99e572c3758032c1ecc165f1a759b2df26fda8cf | MAPLE-Robot-Subgoaling/IPT | /data/HW4/hw4_232.py | 360 | 4.15625 | 4 | def main():
hailNum = int(input("Please enter the starting height of the hailstone: "))
while hailNum != 1 :
print (" Hail is currently at height", int(hailNum) )
if hailNum % 2 == 0:
hailNum = hailNum / 2
elif hailNum % 2 != 0:
hailNum = (hailNum * 3) +1
p... | false |
9164491697c9054aa77cd4dbc5b848897cfb1ef3 | MAPLE-Robot-Subgoaling/IPT | /data/HW5/hw5_111.py | 466 | 4.125 | 4 | def main():
width = int(input("Please enter the width of the box: "))
height = int(input("Please enter the height of the box: "))
symbolOut = input("Please enter the symbol for the box outline: ")
symbolIn = input("Please enter a symbol for the box fill: ")
width2 = (width - 2)
symbol1 = (width ... | true |
09c091612e8ff7d2f1abcfa9f0f2cbac911ef224 | MAPLE-Robot-Subgoaling/IPT | /data/HW4/hw4_109.py | 740 | 4.25 | 4 | def main():
startingHeight = (int(input("Please enter the starting height of the hailstone:")))
if (startingHeight == 1):
print ("Hail stopped at height",startingHeight)
else:
print("Hail is currently at height",startingHeight)
while (startingHeight != 1):
if (startingHeight % 2)... | true |
b3a9e187faac24d060d635a3cf5601e11c1a95bf | MAPLE-Robot-Subgoaling/IPT | /data/HW3/hw3_237.py | 1,010 | 4.15625 | 4 | def main():
temperature = float(input("Please enter the temperature: "))
scaleType = input("Please enter 'C' for Celsius, or 'K' for Kelvin: ")
C_FROZEN = 0
C_BOIL = 100
K_FROZEN = 273
K_BOIL = 373
if scaleType == 'C':
if temperature <= C_FROZEN:
print("At this temperatu... | true |
cdaf91d26893dc124174bc5b9e919c9065f1f593 | MAPLE-Robot-Subgoaling/IPT | /data/HW4/hw4_315.py | 538 | 4.21875 | 4 | def main():
starting_height = int(input("Please enter the starting height of the hailstone: "))
print("Hail is currently at height",starting_height)
while starting_height != 1:
if starting_height % 2 == 0:
starting_height = int(starting_height / 2)
if starting_height != 1:
print("Hail is currently at hei... | true |
a114f24c69db097c663703ae32a90c51ac5b6d14 | MAPLE-Robot-Subgoaling/IPT | /data/HW3/hw3_196.py | 747 | 4.125 | 4 | def main():
user_temp = float(input("Please enter the temperature: "))
user_scale = input("Please enter 'C' for Celsius, or 'K' for Kelvin: ")
if user_scale == 'K':
if user_temp < 273.15:
print("At this temperature, water is a (frozen) solid.")
elif user_temp > 373.15:
... | true |
c4df35c8a0b8dab68815c048f3487c7f243e7d75 | MAPLE-Robot-Subgoaling/IPT | /data/HW3/hw3_415.py | 452 | 4.1875 | 4 | def main():
Temp = float(input("Enter the temperature: "))
Type = input("Enter 'C' for Celsius, or 'K' for Kelvin: ")
if Temp <= 273.15 and Type == "K" or Temp <= 0 and Type == "C":
print("At this temperature, water is a solid.")
elif Temp >= 373.15 and Type == "K" or Temp >= 100 and Type == "C... | true |
987cdb70436033ed5d8253f83c2ca4286aee9d73 | MAPLE-Robot-Subgoaling/IPT | /data/HW4/hw4_290.py | 288 | 4.125 | 4 | def main():
a = int(input("Please enter the starting height of the hailstone: "))
while a !=1:
print("Hail is currently at height",int(a))
if a %2== 0:
a/=2
else:
a = a*3+1
print("Hail stopped at height 1")
main()
| true |
f3fc99aa58bb857b66fe794eb9da3bcc09e62253 | MAPLE-Robot-Subgoaling/IPT | /data/HW5/hw5_254.py | 462 | 4.125 | 4 | def main():
width = int(float(input("Please enter the width of the box: ")))
height = int(float(input("Please enter the hieght of the box: ")))
outline = input("Please enter a symbol for the box outline: ")
fill = input("Please enter a symbol for the box fill: ")
EDGE = 2
height=height-EDGE
... | true |
41669cf282bd4afa08e42abaef9651e42d94f6dc | MAPLE-Robot-Subgoaling/IPT | /src/web/hw3_69.py | 573 | 4.15625 | 4 |
def main():
FREEZE = 0
BOIL = 100
CONVERT = 273.15
temp = float(input("Please enter the temperature: "))
print("Please enter the units...")
units = str(input("Either 'K' for Kelvin or 'C' for Celcius: "))
if units == 'K' :
tempCel = temp - CONVERT
else :
tempCel = t... | true |
e8fae662feeb6aa590fe33becf210da929c7a8ad | MAPLE-Robot-Subgoaling/IPT | /data/HW5/hw5_348.py | 460 | 4.15625 | 4 | def main():
width = int(input("Please enter the width of the box: "))
height = int(input("Please enter the height of the box: "))
symb1 = input("Please enter a symbol for the box outline: ")
symb2 = input("Please enter a symbol for the box fill: ")
width1 = width - 2
fill = symb2 *width1
out... | true |
afeafa3b4267e96a9be0539abfaa626da21f9455 | MAPLE-Robot-Subgoaling/IPT | /data/HW4/hw4_174.py | 558 | 4.3125 | 4 | def main():
userHeight = int(input("Please enter a positive integer that will serve as the starting height for the hailstone: "))
print("Hail height starts at", userHeight)
while userHeight != 1:
if userHeight % 2 == 1:
userHeight = int((userHeight * 3) + 1)
print("Hail heigh... | true |
83dfbf3cbd2f80f48c06dd7763f886026f23ac2d | MAPLE-Robot-Subgoaling/IPT | /data/HW5/hw5_135.py | 794 | 4.125 | 4 | def main():
width = int(input("What do you want the width of the box to be? "))
height = int(input("What do you want the height of the box to be? "))
outline = str(input("Enter the symbol you want the outline to be: "))
fill = str(input("Enter the symbol you want the filling of the box to be: "))
pr... | true |
8a4dfd706d16db0a3a5d148d11ba2399def19641 | MAPLE-Robot-Subgoaling/IPT | /data/HW3/hw3_118.py | 940 | 4.1875 | 4 | def main():
SOLID_TEMP_CELSIUS = 0
GAS_TEMP_CELSIUS = 100
SOLID_TEMP_KELVIN = 273.15
GAS_TEMP_KELVIN = 373.15
tempNum = float(input("Please enter the temperature: "))
degreeType = input("Please enter 'C' for Celsius or 'K' for Kelvin: ")
if (degreeType == "C"):
if (tempNum <= SOLID_TE... | true |
31c4258373d73681e8d1021fb4fac4d42105c0ca | MAPLE-Robot-Subgoaling/IPT | /data/HW3/hw3_421.py | 743 | 4.15625 | 4 | def main():
temp=float(input("Please enter the temperature: "))
scale=input("Please enter 'C' for Celcius, or 'K' for Kelvin: ")
if temp <= 0 and scale == "C":
print("At this temperature, water is a solid.")
elif temp > 0 and temp < 100 and scale == "C":
print("At this temperature, water... | true |
6dfe0293e894534bf993ae70f3a1f3a78e7e9d15 | MAPLE-Robot-Subgoaling/IPT | /data/HW4/hw4_222.py | 399 | 4.3125 | 4 | def main():
height = input("Please enter the current height of the hailstone: ")
height = int(height)
while(height > 1):
height = int(height)
print("The hailstone is at height",height)
if(height % 2 == 0):
height /= 2
elif(height % 2 != 0):
height *= 3... | true |
dae3c37bca2ad430eabd80d5f763b520b214ab5e | MAPLE-Robot-Subgoaling/IPT | /data/HW3/hw3_158.py | 679 | 4.125 | 4 | def main():
temp =float(input("please enter a temperature "))
unit = input("please enter 'C' for celsius or 'K' for kelvin ")
if unit=="C":
if temp <0:
print("At this temperature, water is a solid")
elif temp >100:
print("At this temperature, water is a gas")
elif temp >0 ... | true |
71bc91e8c4ed40169539728b97f99fc0b18170d1 | MAPLE-Robot-Subgoaling/IPT | /data/HW4/hw4_062.py | 516 | 4.28125 | 4 | def main():
hailStormNum = int(input("Please insert a positive integer, which is the starting height of the hailstorm: "))
while hailStormNum != 1:
if hailStormNum % 2 == 0:
hailStormNum = hailStormNum / 2
hailStormNum = int(hailStormNum)
print (hailStormNum)
... | true |
c2865ffd41f13fe9025094fdf6b7a0de4b384e04 | MAPLE-Robot-Subgoaling/IPT | /data/HW3/hw3_207.py | 697 | 4.125 | 4 | def main():
userTemp = float(input("Please enter the temperature: "))
unitScale = input("Please enter 'C' for Celsius, or 'K' for Kelvin: ")
if unitScale == "C":
if userTemp <= 0:
print("At this temperature, water is a solid.")
elif userTemp >= 100:
print("At this tem... | true |
6d99ddfa0e550e40ed5332c54493d4f5a6dc49b4 | MAPLE-Robot-Subgoaling/IPT | /data/HW3/hw3_337.py | 807 | 4.125 | 4 | def main():
temperature = float(input('Please enter the temperature: '))
scale = input('Please enter C for Celsius, or K for Kelvin: ')
if (temperature <= 0) and (scale == 'C'):
print ('At this tmeperature, water is a (frozen) solid.')
elif (temperature >= 100) and (scale == 'C'):
print ... | true |
60050fbfe1d39a9e0ad38e9908a0f8fcba491fe1 | MAPLE-Robot-Subgoaling/IPT | /data/HW3/hw3_233.py | 834 | 4.15625 | 4 | FREEZING_POINT_OF_CELSIUS= 0
BOILING_POINT_OF_CELSIUS = 100
FREEZING_POINT_KELVIN = 373.16
BOILING_POINT_KELVIN= 273.16
def main():
temp= float(input("Please enter the temperature:"))
temp1= (input("Please enter 'C' for Celsius, or 'K' for Kelvin:"))
if temp1 =="C":
if temp > 0 and temp < 100:
... | true |
2c92980b2b3d805d6227c49c796507ce79b88b81 | MAPLE-Robot-Subgoaling/IPT | /data/HW5/hw5_374.py | 486 | 4.125 | 4 | def main():
width = int(input("Please enter the width of the box: "))
height = int(input("Please enter the height of the box: "))
symbol = input("Please enter the symbol for the box outline: ")
filling = input("Please enter the symbol for the box filling: ")
fillWidth = width - 2
for box in rang... | true |
fdf6fbdf2f21fe305e544a367b705a2eead1d2dc | MAPLE-Robot-Subgoaling/IPT | /data/HW5/hw5_123.py | 598 | 4.125 | 4 | def main():
index = 0
widthPrompt = int(input("What is the width of the box? "))
heightPrompt = int(input("What is the height of the box? "))
outsideSymbol = str(input("What character is the outside of the box made of? "))
insideSymbol = str(input("What character is the inside of the box made of? ")... | true |
fa2c9b4e50d08505b1992c319c2fff86781a5d26 | MAPLE-Robot-Subgoaling/IPT | /data/HW3/hw3_179.py | 756 | 4.15625 | 4 | def main():
GAS_C = 100
LIQUID_C = 60
GAS_K = 373.15
LIQUID_K = 333.15
temp = float(input("Please enter the temperature "))
unit = input("Please enter 'C' for Celsius, or 'K' for Kelvin: ")
if unit == 'C':
if temp > GAS_C:
print("At this temperature, water is a gas")
... | true |
95d8cc3d61617d2bdae5c8339d0963acac2bc1b8 | MAPLE-Robot-Subgoaling/IPT | /data/HW4/hw4_447.py | 417 | 4.25 | 4 | def main():
startingHeight=int(input("Please enter the starting height of the hailstone:"))
while startingHeight>1:
print("Hail is currently at Height",startingHeight)
if startingHeight % 2==0:
startingHeight=startingHeight/2
elif startingHeight % 2==1:
startingHe... | true |
3f7e318da7c059e17a7e31761311b49123d30291 | MAPLE-Robot-Subgoaling/IPT | /data/HW3/hw3_425.py | 709 | 4.125 | 4 | def main ():
temp = (float (input ("What is the temperature: ")))
scale = (str (input ("Please enter 'C' for Celsius or 'K' for Kelvin: ")))
if (scale == 'C'):
if (temp >= 100):
print ("At this temperature, water is a gas.")
elif (temp <= 0):
print ("At this temperatu... | true |
84504ced69b52147fdcc671ce10cd68d71e498f2 | MAPLE-Robot-Subgoaling/IPT | /data/HW4/hw4_054.py | 481 | 4.125 | 4 | def main():
EVEN = 0
ODD = 1
height = int(input("Please enter starting height of the hailstorm: "))
print("Hail is currently at height" , height)
while height !=1:
if height % 2 == EVEN:
height = height // 2
print("Hail is currently at height" , height)
el... | true |
c7c6cf60781c3541d6d56ba435aa78f8f969edbc | MAPLE-Robot-Subgoaling/IPT | /data/HW3/hw3_029.py | 775 | 4.125 | 4 | def main():
temp = float(input("Please enter the temperature: "))
letter = input("Please enter 'C' for Celsius or 'K' for Kelvin: ")
if temp <= 0 and letter == 'C':
print("At this temperature, water is a (frozen) solid.")
elif temp >= 1 and temp <= 99 and letter == 'C':
print("At this te... | true |
e80b0695f64f733763171768209cb8d15df416dc | MAPLE-Robot-Subgoaling/IPT | /data/HW4/hw4_134.py | 362 | 4.15625 | 4 | def partFour():
stoneHeight = int(input("What is the hailstone's height? \n"))
while stoneHeight != 1:
print("Current stone height: " + str(stoneHeight))
if(stoneHeight % 2 == 0) :
stoneHeight /= 2
else:
stoneHeight = stoneHeight * 3 +1
print("Stone stopped at... | false |
6ee976cc3bab4e98489059e23009ed4f722ecb8f | MAPLE-Robot-Subgoaling/IPT | /data/HW5/hw5_078.py | 427 | 4.1875 | 4 | width = int(input("Please enter width: "))
height = int(input("Please enter height: "))
symbol_outline = input("Please enter a symbol for the outline:")
symbol_fill = input("Please enter a symbol for the fill:")
def main():
forl_row = symbol_outline*width
mid_row = symbol_outline+(symbol_fill*(width-2))+symbol... | true |
1c5c9abdc59ed57e5213d37b8e9d541ee5b73de6 | MAPLE-Robot-Subgoaling/IPT | /data/HW3/hw3_043.py | 766 | 4.125 | 4 | def main():
enterTemp = float(input("Please enter the temperature: "))
typeTemp = input("Please enter 'C' for Celsisus, or 'K' for Kelvin: ")
if typeTemp == "K" and enterTemp >= 373.16:
print("At this temperature, water is a gas.")
elif typeTemp == "K" and enterTemp <= 273.16:
print("At ... | true |
dbb76edf02c9c3082671fd89df2bcdd9220a2bb6 | MAPLE-Robot-Subgoaling/IPT | /data/HW3/hw3_028.py | 790 | 4.125 | 4 | def main():
unit = input("What unit are you using, enter 'C' for celcius or 'K' for Kelvin")
temp = float(input("What is the temperature?"))
if (temp <= 0) and (unit == "C") :
print("At this temperature, water is a (frozen) solid")
elif (temp >= 100) and (unit == "C") :
print("At this te... | true |
5991c2fbf4a1a987cde366a7a784d1db12fdffc5 | MAPLE-Robot-Subgoaling/IPT | /data/HW4/hw4_431.py | 550 | 4.21875 | 4 | def main():
currentHeight = int(input("Please enter the starting height of the hailstone: "))
print("Hail is currently at height",(currentHeight))
while currentHeight != 1:
if (currentHeight % 2) == 0:
print("Hail is currently at height", currentHeight / 2)
currentHeight = (c... | true |
f6c13e0b0478f843c4ab72ff4689aaad93b24764 | MAPLE-Robot-Subgoaling/IPT | /data/HW4/hw4_030.py | 393 | 4.28125 | 4 | STOP_HEIGHT = 1
def main ():
hailHeight = int ( input ("Please enter the starting height of the hailstone: "))
while hailHeight != STOP_HEIGHT:
if hailHeight % 2 == 0:
print ("Hail is currently at", hailHeight)
hailHeight = hailHeight // 2
else:
print ("Hail is currently at", hailHeight)
hail... | true |
09632cb074fb96b7fd7085474afdddcb5b4c5865 | MAPLE-Robot-Subgoaling/IPT | /data/HW4/hw4_330.py | 249 | 4.125 | 4 | def main():
num = int(input("Enter a positive integer: "))
while (num > 1):
print("Hail is currently at height " + str(num) )
if( num % 2 == 0):
num = num // 2
else:
num = (num * 3) + 1
main()
| false |
f20872e50a04cfe8ecf00603cd58697ca47bda6a | MAPLE-Robot-Subgoaling/IPT | /data/HW3/hw3_037.py | 782 | 4.125 | 4 | def main():
temp = float(input("Please enter your temperature: "))
scale = input("Please enter 'C' for Celsius, or 'K' for Kelvin: ")
if scale == "C" and temp >= 100:
print("At this temperature, the water is a gas.")
elif scale == "C" and (temp <100 and temp >0):
print("At this... | true |
bab242cced1e1ad5251f1876544fa92f2c8f4c73 | MAPLE-Robot-Subgoaling/IPT | /data/HW3/hw3_359.py | 1,070 | 4.3125 | 4 | temp = float(input("Please enter the temperature: "))
scale = input("Please enter 'C' for Celsius, or 'K' for Kelvin: ")
MELTING_POINT_C = 32
BOILING_POINT_C = 100
MELTING_POINT_K = 273.15
BOILING_POINT_K = 373.15
def main():
if scale == "C":
if temp >= 0 and temp < MELTING_POINT_C:
... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.