blob_id string | repo_name string | path string | length_bytes int64 | score float64 | int_score int64 | text string | is_english bool |
|---|---|---|---|---|---|---|---|
582fe920cc4dd459ec3f9b102f3f91dc5fd3960f | xpansong/learn-python | /列表/列表元素的排序.py | 750 | 4.25 | 4 | print('--------使用列表对象sort()进行排序,不生成新的列表,原列表直接运算,不需要重新赋值----------')
lst=[10,90,398,34,21,77,68]
print(lst,id(lst))
#调用列表对象sort(),对列表进行升序排序
lst.sort()
print(lst,id(lst))
#通过指定关键字参数,对列表进行降序排序
lst.sort(reverse=True)
print(lst,id(lst))
print('-------使用内置函数sorted()进行排序,生成新的列表,因此新列表需要重新赋值----------')
lst=[10,90,398,34,21... | false |
39768f5f5217adf08077dfc98865f9a298526804 | stayfu0705/python1 | /M5/method.py | 683 | 4.25 | 4 | str1='hello 123'
print(str1.isalnum()) #有空白就算兩個字串
print(str1.isalpha())
print(str1.isdigit())
print(str1.isidentifier())
str2='hello'
print(str1.isalnum())
print(str1.isalpha())
print(str1.isdigit())
print(str2.isidentifier())
print(str2.isspace())
str5='hello world'
print(str5.startswith('he'))
print(str5.endswith("d... | false |
a29f06832bf4caa10f1c8d4141e96a7a50e55bb9 | YashMali597/Python-Programs | /binary_search.py | 1,180 | 4.125 | 4 | # Binary Search Implementation in Python (Iterative)
# If the given element is present in the array, it prints the index of the element.
# if the element is not found after traversing the whole array, it will give -1
# Prerequisite : the given array must be a sorted array
# Time Complexity : O(log n)
# Space complexity... | true |
de7cb8bb33a31a677b47d8c2915416145dcae572 | phillipemoreira/HackerRank | /Python/BasicDataTypes/Lists.py | 618 | 4.15625 | 4 | #Problem link: https://www.hackerrank.com/challenges/python-lists
list = list()
number_of_commands = int(input())
for i in range(0, number_of_commands):
s = input().split(' ')
command = s[0]
args = s[1:]
if command == "insert":
list.insert(int(args[0]), int(args[1]))
elif command == "print... | false |
d089562243b35b8be2df3c31888518a235858c43 | xiaoying1990/algorithm_stanford_part1 | /merge_sort.py | 2,293 | 4.53125 | 5 | #!/usr/bin/python3
import random
def merge_sort(ar):
"""
O(n*log(n)), dived & conquer algorithm for sorting array to increasing order.
:param ar: type(ar) = 'list', as a array of number.
:return: None, while sorting the parameter 'arr' itself. We can change it, because list is mutable.
"""
ar... | true |
0e48b82567ddcd2eabacdb0c1a4fb514f0e97eb7 | darwinini/practice | /python/avgArray.py | 655 | 4.21875 | 4 | # Program to find the average of all contiguous subarrays of size ‘5’ in the given array
def avg(k, array):
avg_array = []
for i in range(0, len(array) - k + 1):
sub = array[i:i+k]
sum, avg = 0, 0
# print(f"The subarray is {sub}")
for j in sub:
sum+= j
avg =... | true |
0c0718a685533344d5fea9cfdf1ec9d925dbdcd9 | Surya0705/Number_Guessing_Game | /Main.py | 1,407 | 4.3125 | 4 | import random # Importing the Random Module for this Program
Random_Number = random.randint(1, 100) # Giving our program a Range.
User_Guess = None # Defining User Guess so that it doesn't throw up an error later.
Guesses = 0 # Defining Guesses so that it doesn't throw up an error later.
while(User_Guess != Random_Num... | true |
16d1c6a7eca1df4440a78ac2f657a56fa1b8300b | bnew59/sept_2018 | /find_largest_element.py | 275 | 4.21875 | 4 |
#Assignment: Write a program which finds the largest element in the array
# def largest_element(thing):
# for num in thing:
# if num + 1 in
# elements = [1, 2, 3, 4]
a=[1,2,3,4,6,7,99,88,999]
max = a[0]
for i in a:
if i > max:
max=i
print(max) | true |
c64b1e0c45ea4de9c2195c99bfd3b22ab2925347 | Samyak2607/CompetitiveProgramming | /Interview/postfix_evaluation.py | 1,133 | 4.15625 | 4 | print("For Example : abc+* should be entered as a b c + *")
for _ in range(int(input("Enter Number of Test you wanna Test: "))):
inp=input("Enter postfix expression with space: ")
lst=inp.split(" ")
operator=['+','-','/','*','^']
operands=[]
a=1
for i in lst:
if(i not in operator):
... | true |
d5bcb62f24c54b161d518ac32c4a2434d01db76e | PaLaMuNDeR/algorithms | /Coding Interview Bootcamp/16_linked_list.py | 1,665 | 4.25 | 4 | """
Return the middle node of a Linked list.
If the list has an even number of elements, return the node
at the end of the first half of the list.
DO NOT use a counter variable, DO NOT retrieve the size of the list,
and only iterate through the list one time.
Example:
const l = LinkedL()
l.insertLast('a')
... | true |
edbbd4fe3fc4a8646c52d70636369ff1c1c23bd5 | PaLaMuNDeR/algorithms | /Coding Interview Bootcamp/10_capitalize.py | 2,096 | 4.28125 | 4 | import timeit
""" Write a function that accepts a string. The function should
capitalize the first letter of each word in the string then
return the capitalized string.
Examples:
capitalize('a short sentence') -> 'A Short Sentence'
capitalize('a lazy fox') -> 'A Lazy Fox'
capitalize('look, it is wor... | true |
52cf1f1b5914447294ae9eb29b40abaa5086f644 | PaLaMuNDeR/algorithms | /Algo Expert/113_group_anagrams.py | 894 | 4.34375 | 4 | """
Group Anagrams
Write a function that takes in an array of strings and returns a list of groups of anagrams.
Anagrams are strings made up of exactly the same letters, where order doesn't matter.
For example, "cinema" and "iceman" are anagrams; similarly, "foo" and "ofo" are anagrams.
Note that the groups of anagrams... | true |
cdfa714d56aad96ba4cbcd6ff4dfd25865d8e085 | PaLaMuNDeR/algorithms | /Algo Expert/101_Two_number_sum.py | 819 | 4.125 | 4 | """
Two Number Sum
Write a function that takes in a non-empty array of distinct integers and an integer representing a target sum.
If any two numbers in the input array sum up to the target sum, the function should return them in an array,
in sorted order. If no two numbers sum up to the target sum, the function should... | true |
995aaacefeb011ff0ef04a62d4c9fd4688b4450e | PaLaMuNDeR/algorithms | /Algo Expert/124_min_number_of_jumps.py | 1,006 | 4.125 | 4 | """
Min Number Of Jumps
You are given a non-empty array of integers. Each element represents the maximum number of steps you can take forward.
For example, if the element at index 1 is 3, you can go from index Ito index 2, 3, or 4. Write a function that returns
the minimum number of jumps needed to reach the final inde... | true |
edca001ae4dd97c5081f1c6421a457eec39f4ff4 | yasab27/HelpOthers | /ps7twoD/ps7pr2.py | 1,179 | 4.25 | 4 | #
# ps7pr2.py (Problem Set 7, Problem 2)
#
# 2-D Lists
#
# Computer Science 111
#
# If you worked with a partner, put his or her contact info below:
# partner's name:
# partner's email:
#
# IMPORTANT: This file is for your solutions to Problem 2.
# Your solutions to problem 3 should go in ps7pr3.py instead.
import r... | true |
8ed7f544dd1ba222cf0b96ee7f1e3a2b18b9e993 | krathee015/Python_assignment | /Assignment4-task7/task7_exc2.py | 722 | 4.375 | 4 | # Define a class named Shape and its subclass Square. The Square class has an init function which
# takes length as argument. Both classes have an area function which can print the area of the shape
# where Shape’s area is 0 by default.
class Shape:
def area(self):
self.area_var = 0
print("area of... | true |
83e8f766412009bd71dea93ed83a1d1f17414290 | krathee015/Python_assignment | /Assignment3/task5/task5_exc2.py | 376 | 4.34375 | 4 | print("Exercise 2")
# Write a program in Python to allow the user to open a file by using the argv module. If the
# entered name is incorrect throw an exception and ask them to enter the name again. Make sure
# to use read only mode.
import sys
try:
with open(sys.argv[1],"r") as f:
print(f.read())
except:
... | true |
d282703436352013daf16052b74fd03110c645c8 | krathee015/Python_assignment | /Assignment1/Task2/tasktwo_exercise2.py | 984 | 4.125 | 4 | print ("Exercise 2")
result = 0
num1 = eval(input("Enter first number: "))
num2 = eval(input("Enter second number: "))
user_enter = eval(input("Enter 1 for Addition, 2 for Subtraction, 3 for Division, 4 for Multiplication, 5 for Average: "))
if (user_enter == 1):
result = num1 + num2
print ("Addition of two ... | true |
787ab85de849ddb79d1c471a1706677d9b4b74b9 | HuanbinWu/testgit | /pythonjike/function/fuct_test.py | 1,952 | 4.125 | 4 | #!/usr/bin/env python
# _*_ coding:utf-8 _*_
# Author:HuanBing
#函数基本操作
# print('abc',end='\n\n')
# print('abc')
# def func(a,b,c):
# print('a=%s'%a)
# print('b=%s' %b)
# print('c=%s' %c)
# func(1.c=3)
#取得参数个数
# def howlong(first,*other):
# print(1+len(other))
# howlong(123,234,456)
#函数作用域
# var1=... | false |
a09f3ab56f175cb0286000a3251ebf8feee07f68 | murphyk2021/Election_Analysis | /Python_practice.py | 2,712 | 4.5 | 4 | print("Hello World")
counties=["Arapahoe","Denver","Jefferson"]
if counties[1]=='Denver':
print(counties[1])
counties=["Arapahoe","Denver","Jefferson"]
if "El Paso" in counties:
print("El Paso is in the list of counties")
else:
print("El Paso is not in the list of counties")
if "Arapahoe" in counties ... | false |
904d7bf1450e3838387f787eb0411593c739d5f0 | kunal5042/Python-for-Everybody | /Course 2: Python Data Structures/Week 3 (Files)/Assignment_7.2.py | 1,119 | 4.125 | 4 | """
7.2 Write a program that prompts for a file name, then opens that file and reads through the file, looking for lines of the form:
X-DSPAM-Confidence: 0.8475
Count these lines and extract the floating point values from each of the lines and compute the average of those values and produce an output as shown below.... | true |
b3be5eaf872a254f8cec7c7eb33740c9c4f30303 | kunal5042/Python-for-Everybody | /Course 1: Programming for Everbody (Getting Started with Python)/Week 6 (Functions)/Factorial.py | 603 | 4.28125 | 4 | # Here I am using recursion to solve this problem, don't worry about it if it's your first time at recursion.
def Factorial(variable):
if variable == 0:
return 1
return (variable * Factorial(variable-1))
variable = input("Enter a number to calculate it's factorial.\n")
try:
x = int(variabl... | true |
07f9f576b76b56b5f258d563de4b24cf8f5f2673 | kunal5042/Python-for-Everybody | /Course 2: Python Data Structures/Week 5 (Dictionaries)/Dictionaries.py | 1,291 | 4.3125 | 4 | """
Dictionaries:
Dic are python's most powerful data collection.
Dic allow us to do fast database-like operations in python.
Dic have different names in different languages.
For example:
Associative Arrays - Perl / PHP
Properties or Map or HashMap - Java
Property Bag - C# /.Net
"""
def dictionaryDemo():
#Initi... | true |
e52b318f5ef1e29c6f6ff08ef2fb68336c62ab4b | kunal5042/Python-for-Everybody | /Course 1: Programming for Everbody (Getting Started with Python)/Week 5 (Comparison Operators, Exception Handling basics)
/Assignment_3.1.py | 1,066 | 4.28125 | 4 | """
3.1 Write a program to prompt the user for hours and rate per hour using input to compute gross pay. Pay the hourly rate for the hours up to 40 and 1.5 times the hourly rate for all hours worked above 40 hours. Use 45 hours and a rate of 10.50 per hour to test the program (the pay should be 498.75). You should use ... | true |
c2138c13915b9f7cde94d6989b462023e1b1becc | kunal5042/Python-for-Everybody | /Assignments-Only/Assignment_7.1.py | 1,002 | 4.46875 | 4 | """
7.1 Write a program that prompts for a file name, then opens that file and reads through the file, and print the contents of the file in upper case. Use the file words.txt to produce the output below.
You can download the sample data at http://www.py4e.com/code3/words.txt
"""
import urllib.request, urllib.parse, u... | true |
681e8e75e103cfb2227a50813a6a8789320a277a | kunal5042/Python-for-Everybody | /Course 1: Programming for Everbody (Getting Started with Python)/Week 4 (Syntax, Reserved Words, Type Conversions, Variables)
/AssignOperator.py | 597 | 4.46875 | 4 | print("Assignment operator example:")
#Example:
print("Hi!")
myName= "Kunal"
print("\nMy name is " + myName)
myLastName = "Wadhwa"
print("My last name is " + myLastName)
myFullName = myName + " " + myLastName
print("\nMy full name is " + myFullName)
age= 19
age= age + 1
print(("I am ") + str(age) + (" years old."... | false |
97e1c7c3c00067602ca94705bb73f097d464a735 | ShrutiBhawsar/problem-solving-py | /Problem4.py | 1,547 | 4.5 | 4 | #Write a program that asks the user how many days are in a particular month, and what day of the
# week the month begins on (0 for Monday, 1 for Tuesday, etc), and then prints a calendar for that
# month. For example, here is the output for a 30-day month that begins on day 4 (Thursday):
# S M T W T F S
# 1 2 3
# 4 5 6... | true |
4f03b84942530c09ff2932e497683e5f75ccbf9c | ShrutiBhawsar/problem-solving-py | /Problem2_USerInput.py | 1,237 | 4.3125 | 4 | #2. Print the given number in words.(eg.1234 => one two three four).
def NumberToWords(digit):
# dig = int(digit)
"""
It contains logic to convert the digit to word
it will return the word corresponding to the given digit
:param digit: It should be integer
:return: returns the string back
... | true |
dcee80352c93df7f9dccfef14c15ea31dd7bfe88 | databooks/databook | /deepml/pytorch-examples02/nn/two_layer_net_module.py | 1,980 | 4.21875 | 4 | import torch
"""
A fully-connected ReLU network with one hidden layer, trained to predict y from x
by minimizing squared Euclidean distance.
This implementation defines the model as a custom Module subclass. Whenever you
want a model more complex than a simple sequence of existing Modules you will
need to define your... | true |
75e8edfa8f01a8605e6f8fb37fecfe5f23d1ce2f | lpython2006e/student-practices | /12_Nguyen_Lam_Manh_Tuyen/2.7.py | 610 | 4.1875 | 4 | #Write three functions that compute the sum of the numbers in a list: using a for-loop, a while-loop and recursion.
# (Subject to availability of these constructs in your language of choice.)
def sum_with_while(lists):
list_sum = 0
i = 0
while i < len(lists):
list_sum += lists[i]
i += 1
... | true |
b2c73a750653b98ec18668d59309bba5dc3f1a94 | lpython2006e/student-practices | /9_Phan_Van_Quan/bai2_9.py | 216 | 4.15625 | 4 | #Write a function that concatenates two lists. [a,b,c], [1,2,3] → [a,b,c,1,2,3]
def concatenates(list_1,list_2):
return list_2 + list_1
list_3 = ['a','b','c']
list_4 = [1,2,3]
print(concatenates(list_3,list_4)) | false |
820baad5f24cfc52195fbf11f5c74214812a1b76 | lpython2006e/student-practices | /12_Nguyen_Lam_Manh_Tuyen/1.3.py | 308 | 4.25 | 4 | #Modify the previous program such that only the users Alice and Bob are greeted with their names.
names=["Alice","Bob"]
name=()
while name not in names:
print("Please input your name")
name = input()
if name=="Alice":
print("Hello",name)
elif name=="Bob":
print("Hello",name)
| true |
56dbe18f5cd493157d153647e82cc9b94fcb8f6c | Bhaveshsadhwani/Test | /ASSESSMENT/Que14 .py | 281 | 4.3125 | 4 | # -*- coding: utf-8 -*-
"""
Created on Tue Oct 10 16:25:08 2017
@author: User
"""
num = input("Enter a positive number:")
if (num > 0) and (num &(num-1))==0:
print num,"is a power of 2"
else:
print num,"is not a power of 2 "
| true |
4ff98dc017eda7df9a80c19e72fab899eac3b044 | YuhaoLu/leetcode | /1_Array/easy/python/rotate_array.py | 1,677 | 4.125 | 4 | """
0.Name:
Rotate Array
1.Description:
Given an array, rotate the array to the right by k steps, where k is non-negative.
Could you do it in-place with O(1) extra space?
2.Example:
Input: [1, 2, 3, 4, 5, 6, 7] and k = 3
Output: [5, 6, 7, 1, 2, 3, 4]
3.Solution:
array.unshift ... | true |
8244b2c89489b52681b49174ee7889ec473cf6d7 | YuhaoLu/leetcode | /4_Trees/easy/python/Symmetric_Tree.py | 2,166 | 4.53125 | 5 | """
0.Name:
Symmetric Tree
1.Description:
Given the root of a binary tree, check whether it is a mirror of itself (i.e., symmetric around its center)
2.Example:
Given linked list:
1
/ \
2 2
/ \ / \
3 4 4 3
Input: root =... | true |
1df94c11e36c23bd17752519659f96de91f7ea97 | johnerick89/iCube_tasks | /task2.py | 735 | 4.375 | 4 |
def get_maximum_value_recursion(weight,values,capacity, n):
'''
Function to get maximum value
Function uses recursion to get maximum value
'''
if n==0 or capacity == 0:
return 0
if weight[n-1]>capacity:
return get_maximum_value_recursion(weight,values,capacity, n-1)
else... | true |
951e6870e1c504e5e17122f8cb7a8600d13115bc | jtpio/algo-toolbox | /python/mathematics/cycle_finding.py | 1,154 | 4.21875 | 4 | def floyd(f, start):
""" Floyd Cycle Finding implementation
Parameters
----------
f: function
The function to transform one value to its successor
start:
The start point from where the cycle detection starts.
Returns
-------
out: tuple:
- mu: int
Position at ... | true |
1947d4f1bdbcbc54ca8ffbbaaa984b8b91bb837f | BrenoAlv/Projeto-Programa-o- | /q15.py | 2,677 | 4.5 | 4 | #Jogo de Pedra, papel e tesoura: nesse jogo cada jogador faz sua escolha (1 –Tesoura, 2 – Pedra, 3 – Papel),
# e vence aquele que escolher um objeto que seja capaz de vencer o outro.Faça que leia a opção de objeto do primeiro jogador
# a opção de objeto do segundo jogador e informe qual jogador venceu(ou se houve emp... | false |
d73cc193848b102bd003c6328665289c6e4c6823 | mvered/ME106 | /Week3Assignment-VeredM-countdown.py | 552 | 4.375 | 4 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Week 3 Assignment - Wellstone ME 106 - Part II
Created on Sat Aug 11 12:46:54 2018
@author: mvered
"""
countdownMessage = ' more days until the election!'
lastDayMessage = ' more day until the election!'
electionDayMessage = 'Today is election day!'
daysLeft = inpu... | false |
104b6b05bd01b2b0cee8fdbfa5f58abfce1cba58 | geshem14/my_study | /Coursera_2019/Python/week4/week4task11.py | 1,109 | 4.15625 | 4 | # week 4 task 11
"""
текст задания тут 79 символ=>!
Дано действительное положительное число a и целое неотрицательное число n.
Вычислите aⁿ, не используя циклы и стандартную функцию pow,
но используя рекуррентное соотношение aⁿ=a⋅aⁿ⁻¹.
Решение оформите в виде функции powe... | false |
ff2c2f984035f5f3d4994da9e2c2654bab625a32 | geshem14/my_study | /Coursera_2019/Python/week3/week3task15.py | 1,259 | 4.125 | 4 | # week 3 task 15
"""
текст задания
Дана строка. Если в этой строке буква f встречается только один раз,
выведите её индекс. Если она встречается два и более раз,
выведите индекс её первого и последнего появления.
Если буква f в данной строке не встречается, ничего не выводите.
При решении этой задачи нельзя использоват... | false |
0bf6ccbcf81fde22edc6fb0ed7af72317050ca53 | geshem14/my_study | /Coursera_2019/Python/week3/week3task16.py | 832 | 4.125 | 4 | # week 3 task 16
"""
текст задания тут 79 символ=>!
Дана строка, в которой буква h встречается минимум два раза.Удалите из этой
строки первое и последнее вхождение буквы h,
а также все символы, находящиеся между ними.
"""
string = input() # строковая переменная для ввода... | false |
4803471f9a118dc56d4996bf5c850706e6258d17 | geshem14/my_study | /Coursera_2019/Python_Advance/week2/week1learning.py | 1,547 | 4.75 | 5 | # week 2 learning
# video 1. Lists and Tuples
"""
поиск медианы случайного списка. Медиана - это значение в отсортированном
списке, которое лежит ровно посередине, таким образом, половина значений -
слева от него, и половина значений --- справа
"""
import random
import statistics
numbers = []
numbers_size = random.ran... | false |
ed32eff5d2a297f299deacf1e22d68193494fcce | Starluxe/MIT-6.00.1x-Introduction-to-Computer-Science-and-Programming-Using-Python | /Problem Set 1/Problem 3 - Longest Alphabetcal Substring.py | 1,187 | 4.28125 | 4 | # Assume s is a string of lower case characters.
# Write a program that prints the longest substring of s in which the letters
# occur in alphabetical order. For example, if s = 'azcbobobegghakl',
# then your program should print
# Longest substring in alphabetical order is: beggh
# In the case of ties, print the ... | true |
b2da8890a183783c996070701b900c866f235d61 | Starluxe/MIT-6.00.1x-Introduction-to-Computer-Science-and-Programming-Using-Python | /Final Exam/Problem 3.py | 631 | 4.1875 | 4 | # Implement a function that meets the specifications below.
# def sum_digits(s):
# """ assumes s a string
# Returns an int that is the sum of all of the digits in s.
# If there are no digits in s it raises a ValueError exception. """
# # Your code here
# For example, sum_digits("a;35d4") retu... | true |
0d9cee17b396341ca249c90414f66e2d9602757f | willianyoliveira/Mundo-Python-1---curso-em-v-deo | /DEsafio017.py | 430 | 4.125 | 4 | '''Catetos e hipotenusa'''
import math
'''x = float(input('Qual o comprimento do cateto oposto: '))
y = float(input('Qual o comprimento do cateto adjascente: '))
h = (x*x + y*y)**0.5
print('O valor da hipotenusa é {.2f}.'.format(h))'''
x = float(input('Qual o comprimento do cateto oposto: '))
y = float(input('Qual o ... | false |
94846af53f588d81cf57e822044d204cb5fef2d1 | lukelafountaine/euler | /23.py | 1,887 | 4.25 | 4 | #! /usr/bin/env python
# A perfect number is a number for which the sum of its proper divisors is exactly equal to the number.
# For example, the sum of the proper divisors of 28 would be 1 + 2 + 4 + 7 + 14 = 28,
# which means that 28 is a perfect number.
#
# A number n is called deficient if the sum of its proper div... | true |
f3d520e3294cb123db91beab99d28c34c939b1d0 | lukelafountaine/euler | /1.py | 426 | 4.34375 | 4 | #! /usr/bin/env python
# If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9.
# The sum of these multiples is 23.
#
# Find the sum of all the multiples of 3 or 5 below 1000.
def sum_of_multiples(n, bound):
multiples = (bound - 1) / n
return n * ((multiples * (multip... | true |
e847163243fab51dede630b814f58e804aca5569 | cristiancmello/python-learning | /10-brief-tour-stdlib/10.5-str-pattern-match/script-1.py | 314 | 4.28125 | 4 | # String Pattern Matching
# Um módulo chamado 're' fornece ferramentas para processamento avançado de strings
# através de expressões regulares.
import re
print(re.findall(r'\bf[a-z]*', 'which foot or hand fell fastest')) # ['foot', 'fell', 'fastest']
print('tea for too'.replace('too', 'two')) # tea for two | false |
73cf62270898593c9931bb8d1cc1c477f326bea8 | cristiancmello/python-learning | /3-informal-intro-python/3.2-strings/script-1.py | 2,068 | 4.25 | 4 | # Strings
# Pode usar tanto '' quanto "" para expressar strings. Os caracteres de escape
# são POSIX (\n, \t, ...)
print('spam eggs')
print('\"Hello, Double Quotes\"')
print('Fist Line\n\tSecond Line.')
# String com caractere de formatação ignorado
print('Primeira linha\nova linha') # Observa-se que 'nova linha' fi... | false |
9f1ceda961e34223e3f49243c7bb0718bcb00d18 | cristiancmello/python-learning | /5-data-structures/5.1-more-on-lists/script-1.py | 2,717 | 4.71875 | 5 | # Data Structures
# Funções de listas
# Append
# Colocar um elemento ao final de uma lista.
lista = [1, 2]
lista.append(3)
print(lista) # [1, 2, 3]
# Extend
# Colocar uma lista ao final de outra.
lista = [1, 2]
lista.extend([3, 4])
print(lista) # [1, 2, 3, 4]
# Insert
# Inserir um elemento em determinada posiç... | false |
e3f3b2e210c39bcbfab71de8ab5e725d2f763586 | cristiancmello/python-learning | /9-classes/9.9-iterators/script-1.py | 392 | 4.53125 | 5 | # Iterators
# Muitos objetos podem ser percorridos por loops 'for'.
for element in [1, 2, 3]:
print(element)
for element in (1, 2, 3):
print(element)
for key in {'one': 1, 'two': 2}:
print(key)
# Por trás da cortina, o Python chama o método 'iter()' do objeto.
obj = {'name': 'John Doe', 'email': 'j... | false |
e0d9b4ea2c9cd5128237e4c28a9eec2d275bcf42 | yangninghua/code_library | /book-code/图解LeetCode初级算法-源码/5/reverseInteger.py | 1,316 | 4.15625 | 4 | #!/usr/bin/env python3
#-*- coding:utf-8 -*-
# File: /Users/king/Python初级算法/code/5/reverse.py
# Project: /Users/king/Python初级算法/code/5
# Created Date: 2019/02/10
# Author: hstking hst_king@hotmail.com
def reverse(x):
# tList = list(str(x))
# if tList[0] == '-':
# rNum = int(''.join(tList[1:][::-1... | false |
4315e3e8c1185f64dc1dd7ad6fcf63e723fc6e0c | marii-20/GeekBrains-Homework | /lesson-1-1.py | 896 | 4.21875 | 4 | #Поработайте с переменными, создайте несколько,
# выведите на экран, запросите у пользователя несколько
# чисел и строк и сохраните в переменные, выведите на экран
greeting = ('Привет! Меня зовут Мария. \n')
age = 28
info = (f'Мне {age} лет и я учусь на python-разработчика. \n')
question = ('Теперь ваша очередь расска... | false |
87351efb827796bdde84fa15df577ad52b615ff5 | jfulghum/practice_thy_algos | /LinkedList/LLStack.py | 1,496 | 4.1875 | 4 | # Prompt
# Implement a basic stack class using an linked list as the underlying storage. Stacks have two critical methods, push() and pop() to add and remove an item from the stack, respectively. You'll also need a constructor for your class, and for convenience, add a size() method that returns the current size of the... | true |
be1d46e5b24abc08a5ea94810dc69cc3297bbc29 | jfulghum/practice_thy_algos | /LinkedList/queue_with_linked _list.py | 1,352 | 4.5625 | 5 | # Your class will need a head and tail pointer, as well as a field to track the current size.
# Enqueue adds a new value at one side.
# Dequeue removes and returns the value at the opposite side.
# A doubly linked list is one of the simplest ways to implement a queue. You'll need both a head and tail pointer to keep t... | true |
20059f23388b82201b8a8210f90fe3cc04a16e5a | 31337root/Python_crash_course | /Exercises/Chapter5/0.Conditionial_tests.py | 500 | 4.15625 | 4 | best_car = "Mercedes"
cars = ["Mercedes", "Nissan", "McLaren"]
print("Is " + cars[0] + " the best car?\nMy prediction is yes!")
print(cars[0] == best_car)
print("Is " + cars[1] + " the best car?\nMy prediction is nop :/")
print(cars[1] == best_car)
print("Is " + cars[2] + " the best car?\nMy prediction is nop :/")
pr... | true |
c7663e6804cc478e517727f7996c6f5df936d364 | jerrywardlow/Euler | /6sumsquare.py | 592 | 4.1875 | 4 | def sum_square(x):
'''1 squared plus 2 squared plus 3 squared...'''
total = 0
for i in range(1, x+1):
total += i**2
return total
def square_sum(x):
'''(1+2+3+4+5...) squared'''
return sum(range(1, x+1))**2
def print_result(num):
print "The range is 1 through %s" % num
print "... | true |
8428faf468f3c47d0e789bc73037d4da2380b206 | MikhailChernetsov/python_basics_task_1 | /Hometask3/ex1/main.py | 1,562 | 4.34375 | 4 | '''
1. Реализовать функцию, принимающую два числа (позиционные аргументы)
и выполняющую их деление. Числа запрашивать у пользователя,
предусмотреть обработку ситуации деления на ноль.
'''
# Вариант 1 - через исключения
def division(dividend, divisor):
try:
result = dividend / divisor
except ZeroDivis... | false |
de7890db84895c8c8b9e5131bbf7528dc9e3a74f | Annarien/Lectures | /L6.2_25_04_2018.py | 356 | 4.3125 | 4 | import numpy
#make a dictionary containing cube from 1-10
numbers= numpy.arange(0,11,1)
cubes = {}
for x in numbers:
y = x**3
cubes[x]=y
print ("The cube of "+ str(x) +" is "+ str(y))
# making a z dictionary
# print (cubes)
print (cubes)
#for x in cubes.keys(): #want to list ... | true |
d50712514658b8684da51f1e1d6dae88a5d1fb9f | FangShinDeng/pythonlearning | /datatype.py | 1,612 | 4.3125 | 4 | """
Text Type: str
Numeric Types: int, float, complex
Sequence Types: list, tuple, range
Mapping Type: dict
Set Types: set, frozenset
Boolean Type: bool
Binary Types: bytes, bytearray, memoryview
"""
x = 'John'
print(type(x))
# Numeric Types
x = 5
print(type(x))
x = 5.4
print(type(x))
x = 5j #虛數
print(type(x))
# S... | false |
e1336bc4c6810f7cd908f333502a3b6c83ca394c | bossenti/python-advanced-course | /sets.py | 1,137 | 4.21875 | 4 | # Set: collection data-type, unordered, mutable, no duplicates
# creation
my_set = {1, 2, 3}
my_set_2 = set([1, 2, 3])
my_set_3 = set("Hello") # good trick to count number of different characters in one word
# empty set
empty_set = set # {} creates a dictionary
# add elements
my_set.add(4)
# remove elements
my_se... | true |
0473436545a37999dd4788a5438e8db3116d506e | chengaojie0011/offer-comein | /py-project/tree/tree_build 2.py | 1,308 | 4.28125 | 4 | # -*- coding:utf-8 -*-
class Node(object):
"""节点类"""
def __init__(self, value=None, left=None, right=None):
self.value = value
self.left = left
self.right = right
class Tree(object):
"""二叉树类"""
def __init__(self):
"""初始化树类的根节点和遍历队列"""
self.root = Node()
... | false |
6ba34b1bcd307cbac829ad8fbaba27571cd2c807 | punkyjoy/LearningPython | /03.py | 514 | 4.125 | 4 | print("I will now count my chickens")
print("hens", 25.00+30.00/6.0)
print("roosters", 100.0-25.0*3.0%4.0)
print("Now I will count the eggs:")
print(3.0+2.0+1.0-5.0+4.0%2.0-1.0/4.0+6.0)
print("Is is true that 3.0+2.0<5.0-7.0?")
print(3.0+2.0<5.0-7.0)
print("What is 3+2?", 3.0+2.0)
print("What is 5-7?", 5-7)
#this i... | true |
9d92d23a4cd275da2cbcefa822c0c5fb0228853f | ananunes07/Lista6python | /Lista de exercício 2/Exe01.py | 879 | 4.34375 | 4 | '''
Autor: Ana Clara Nunes
Data: 14/05/2018
Enunciado:
Faça um programa que peça os três lados de um triângulo. O programa deverá informar se os valores poem ser um triângulo. Indique, caso os lados formem um triângulo, se o mesmo é: equilátero, isósceles ou escaleno.
'''
A = float(input('Digite o lado A: '))
B = f... | false |
d4bad854227ad91b7ad5a305906060837f0a11fa | Prince9ish/Rubik-Solver | /colors.py | 1,592 | 4.1875 | 4 | '''For representing color of the rubik's cube.'''
from pygame.locals import Color
from vpython import *
class ColorItem(object):
'''WHITE,RED,BLUE,etc are all instances of this class.'''
def __init__(self,name="red"):
self.name=name
self.color=color.red
self.opposite=None
de... | true |
521654cd787e15308b36e274745edf1cc1a0dae7 | joaopauloramos/pythonbirds_I | /calculadora/oo/framework.py | 1,460 | 4.21875 | 4 | # Classes Abstratas
class Operacao:
"""Classe responsável por definir como calculo é feito"""
def calcular(self, p1, p2):
raise NotImplementedError('Precisa ser implementado')
class Calculadora:
"""Classe responsável por obter inputs e efetuar operação de acordo"""
def __init__(self):
... | false |
70b5dfe3c86a6f59f0e656834df5b5dc52e2e151 | joaopauloramos/pythonbirds_I | /calculadora/procedural/biblioteca.py | 763 | 4.15625 | 4 | def calcular_iterativamente_forma_infixa():
p1 = input('Digite o primeiro número: ')
p1 = float(p1)
sinal = input('Digite o sinal da operação (+ ou -): ')
p2 = input('Digite o segundo número: ')
p2 = float(p2)
return _calcular(sinal, p1, p2)
def calcular_iterativamente_forma_prefixa():
sin... | false |
ae471d6db283d8d28d6fe43934656f47a5192cec | claudiordgz/GoodrichTamassiaGoldwasser | /ch01/c113.py | 357 | 4.125 | 4 | __author__ = 'Claudio'
"""Write a pseudo-code description of a function that reverses a list of n
integers, so that the numbers are listed in the opposite order than they
were before, and compare this method to an equivalent Python function
for doing the same thing.
"""
def custom_reverse(data):
return [data[len(... | true |
364107a1b807d346b5dc38846598dd402063aa3a | gauthamkrishna1312/python_xp | /fn1.py | 233 | 4.125 | 4 | def check(num):
if num == 0:
print("Zero")
elif num > 0:
print("Positive")
elif num < 0:
print("Negative")
else:
print("Invalid input")
value = input("Enter a number = ")
check(value) | false |
47ade36bd4fc754b29fd7a3cd898ddef5b87ca7e | smholloway/miscellaneous | /python/indentation_checker/indentation_checker.py | 2,876 | 4.375 | 4 | def indentation_checker(input):
# ensure the first line is left-aligned at 0
if (spaces(input[0]) != 0):
return False
# emulate a stack with a list
indent_level = []
indent_level.append(0)
# flag to determine if previous line encountered was a control flow statement
previous_line_was_control = False
# iter... | true |
d1f00fa6f224748010687c63f08e01a3142d62cf | pawlmurray/CodeExamples | /ProjectEuler/1/MultiplesOf3sAnd5s.py | 688 | 4.3125 | 4 | #get all of the multiples of threes and add them up
def sumOfMultiplesOfThrees(max):
currentSum = 0
threeCounter = 3
while(threeCounter < max):
currentSum+= threeCounter
threeCounter += 3
return currentSum
#Get all of the multiples of fives and add them up, if they are
#evenly divis... | true |
d7468de2be523b14bb8cddf5e10bf67e64663fe9 | Kartikkh/OpenCv-Starter | /Chapter-2/8-Blurring.py | 2,789 | 4.15625 | 4 |
## Blurring is a operation where we average the pixel with that region
#In image processing, a kernel, convolution matrix, or mask is a small matrix. It is used for blurring, sharpening,
#embossing, edge detection, and more.
#This is accomplished by doing a convolution between a kernel and an image.
# https://www.yo... | true |
514fbfa2e340addc29c2a928a6ace99c042fcb7b | jmtaysom/Python | /Euler/004ep.py | 643 | 4.25 | 4 | from math import sqrt
def palindrome():
"""
A palindromic number reads the same both ways.
The largest palindrome made from the product
of two 2-digit numbers is 9009 = 91 × 99.
Find the largest palindrome made from the
product of two 3-digit numbers.
"""
for x in range(999,100,-1):
... | true |
25785c99718e4f26dbb5b63a583b522d46697ebd | Agent1000/pythoner-ML2AI | /หาเลข มากสุด น้อยสุด.py | 682 | 4.25 | 4 | x=int(input("กรอกเลขครั้งที่ 1 > "))
y=int(input("กรอกเลขครั้งที่ 2 > "))
z=int(input("กรอกเลขครั้งที่ 3 > "))
if z>y and z>x :print(z,"มากที่สุด")
elif x>y and x>z:print(x,"มากที่สุด")
elif y>x and y>z :print(y,"มากที่สุด")
if z<y and z<x : print(z,"น้อยที่สุด") #if เช็คใหม่ หาเลขน้อยสุด
elif x<y and x<z:print(x,"... | false |
5904acd697e84a4063452b706ab129537e53ab5b | Aryamanz29/DSA-CP | /gfg/Recursion/binary_search.py | 627 | 4.15625 | 4 | #binary search using recursion
def binary_search(arr, target):
arr = sorted(arr) #if array is not sorted
return binary_search_func(arr, 0, len(arr)-1, target)
def binary_search_func(arr, start_index, end_index, target):
if start_index > end_index:
return -1 # element not found
mid = (start_index+end_index) //2... | true |
d346746005b6b2a5c0b25a92e63f92c0bbadfa89 | Aryamanz29/DSA-CP | /random/word_count.py | 1,116 | 4.125 | 4 | # You are given some words. Some of them may repeat. For each word, output its number of occurrences. The output order should correspond with the input order of appearance of the word. See the sample input/output for clarification.
# Note:
# All the words are composed of lowercase English letters only.
# Input Format... | true |
eba979bd967c81ba4ad6d2435ffb09b3e4f5059f | n1e2h4a/AllBasicProgram | /BasicPython/leadingzero.py | 264 | 4.21875 | 4 | mystring="python"
#print original string
print("the original string :--- "+ str(mystring))
#no of zeros want
zero=5
#using rjust()for for adding leading zero
final=mystring.rjust(zero + len(mystring), '0')
print("string after adding leading zeros : " + str(final)) | true |
435fd488d1a513ebebcfc35354be57debca54442 | n1e2h4a/AllBasicProgram | /ListPrograms.py/MinimumInList.py | 213 | 4.125 | 4 | table = []
number = int(input("Enter number of digit you want to print:---"))
for x in range(number):
Element = int((input(' > ')))
table.append(Element)
table.sort()
print("Smallest in List:", *table[:1]) | true |
18b9d6e60429bcfc31d56ece3f3d1c1c79bb30d6 | abdul1380/UC6 | /learn/decorater_timer.py | 1,792 | 4.4375 | 4 | """
The following @debug decorator will print the arguments a function is
called with as well as its return value every time the function is called:
"""
import functools
import math
def debug(func):
"""Print the function signature and return value"""
@functools.wraps(func)
def wrapper_debug(*args, **kwarg... | true |
d4cbd946ea754ed8bddb1f487f6a4250c4e3a96b | dengxinjuan/springboard | /python-syntax/words.py | 319 | 4.15625 | 4 | def print_upper_words(words,must_start_with):
for word in words:
for any in must_start_with:
if word.startswith(any):
result = word.upper()
print(result)
print_upper_words(["hello", "hey", "goodbye", "yo", "yes"],
must_start_with={"h", "y"}) | true |
5e26fa7180ec61b226b2824f4c3d4120df770254 | ptsiampas/Exercises_Learning_Python3 | /18_Recursion/Exercise_18.7.2a.py | 1,089 | 4.375 | 4 | import turtle
from math import cos, sin
def cesaro_fractal(turtle, order, size):
"""
(a) Draw a Casaro torn line fractal, of the order given by the user.
We show four different lines of order 0, 1, 2, 3. In this example, the angle of the
tear is 10 degrees.
:return:
"""
if order == 0: # T... | true |
712a129202333470151c53d20af112057b41d9f6 | ptsiampas/Exercises_Learning_Python3 | /15._Classes and Objects_Basics/Exercise_15.12.4.py | 1,970 | 4.375 | 4 | # 4. The equation of a straight line is “y = ax + b”, (or perhaps “y = mx + c”). The coefficients
# a and b completely describe the line. Write a method in the Point class so that if a point
# instance is given another point, it will compute the equation of the straight line joining
# the two points. It must return the... | true |
b10e4275bac85b19fbd094a6e205386b6f73f169 | ptsiampas/Exercises_Learning_Python3 | /07_Iteration/Exercise_7.26.16.py | 1,062 | 4.125 | 4 | # Write a function sum_of_squares(xs) that computes the sum of the squares of the numbers in the list xs.
# For example, sum_of_squares([2, 3, 4]) should return 4+9+16 which is 29:
#
# test(sum_of_squares([2, 3, 4]), 29)
# test(sum_of_squares([ ]), 0)
# test(sum_of_squares([2, -3, 4]), 29)
import sys
def test(actual,... | true |
ad104e36e782364406c66006947e838a5ec2ab4d | ptsiampas/Exercises_Learning_Python3 | /05_Conditionals/Exercise_5.14.11.py | 710 | 4.25 | 4 | #
# Write a function is_rightangled which, given the length of three sides of a triangle, will determine whether the
# triangle is right-angled. Assume that the third argument to the function is always the longest side. It will return
# True if the triangle is right-angled, or False otherwise.
#
__author__ = 'petert'
... | true |
087cad1c17766f45940c7e98e789862465ba2934 | ptsiampas/Exercises_Learning_Python3 | /18_Recursion/Exercise_18.7.3.py | 1,236 | 4.4375 | 4 | from turtle import *
def Triangle(t, length):
for angle in [120, 120, 120]:
t.forward(length)
t.left(angle)
def sierpinski_triangle(turtle, order, length):
"""
3. A Sierpinski triangle of order 0 is an equilateral triangle. An order 1 triangle can be drawn by drawing 3
smaller triang... | true |
fa87af0a96105b9589fad9a32955db349089d5cd | ptsiampas/Exercises_Learning_Python3 | /18_Recursion/Exercise_18.7.10.py | 1,506 | 4.21875 | 4 | # Write a program that walks a directory structure (as in the last section of this chapter), but instead of printing
# filenames, it returns a list of all the full paths of files in the directory or the subdirectories.
# (Don’t include directories in this list — just files.) For example, the output list might have elem... | true |
3de631c83b785cac3822aaaf26d06e85a32ce736 | ptsiampas/Exercises_Learning_Python3 | /21_Even_more_OOP/Examples_Point21.py | 2,367 | 4.5625 | 5 | class Point:
""" Point class represents and manipulates x,y coords. """
def __init__(self, x=0, y=0):
""" Create a new point at the origin """
self.x = x
self.y = y
def __str__(self): # All we have done is renamed the method
return "({0}, {1})".format(self.x, self.y)
... | true |
dbdf7c1059cffe23b0d8c47348e25e0c9347ed7e | ptsiampas/Exercises_Learning_Python3 | /01_03_Introduction/play_scr.py | 615 | 4.15625 | 4 | import turtle # Allows us to use turtles
wn = turtle.Screen() # Creates a playground for turtles
wn.bgcolor("lightgreen") # Sets window background colour
wn.title("Hey its me") # Sets title
alex = turtle.Turtle() # Create a turtle, assign to alex
alex.color("blue") # pen colour blue
ale... | true |
6c151bbd8c7b00728fc6288bce8cec511d839050 | ptsiampas/Exercises_Learning_Python3 | /06_Fruitful_functions/Exercises_6.9.14-15.py | 1,449 | 4.53125 | 5 | # 14. Write a function called is_even(n) that takes an integer as an argument and returns True if the argument is
# an even number and False if it is odd.
import sys
def test(actual, expected):
""" Compare the actual to the expected value,
and print a suitable message.
"""
linenum = sys._getframe(1... | true |
2217a5fe8973d2d5a8d900f1c5ddc9b2b07f5689 | sobinrajan1999/258213_dailyCommit | /print.py | 518 | 4.28125 | 4 | print("hello world")
print(1+2+3)
print(1+3-4)
# Python also carries out multiplication and division,
# using an asterisk * to indicate multiplication and
# a forward slash / to indicate division.
print(2+(3*4))
# This will give you float value
print(10/4)
print(2*0.75)
print(3.4*5)
# if you do not want float value the... | true |
c0ced71bc1ef01689981bdc9f5c0f227ac76226a | rosexw/Practice_Python | /1-character_input.py | 842 | 4.125 | 4 | # https://www.practicepython.org/
# Create a program that asks the user to enter their name and their age. Print out a message addressed to them that tells them the year that they will turn 100 years old.
# name = raw_input("What is your name: ")
# age = int(input("How old are you: "))
# year = str((2018 - age)+100)
... | true |
b96824853b54624a33730716da977019b9958c3d | BubbaHotepp/code_guild | /python/palindrome.py | 505 | 4.1875 | 4 | def reverse_string(x):
return x[::-1]
def compare(x,y):
if x == y:
return True
else:
return False
def main():
user_input = input('Please enter a word you think is an anagram: ')
print(user_input)
input_reversed = reverse_string(user_input)
print(input_reversed)
x = co... | true |
e9bac2547bac4dc0637c3abee43a3194802cbddc | tab0r/Week0 | /day2/src/dict_exercise.py | 1,762 | 4.15625 | 4 | def dict_to_str(d):
'''
INPUT: dict
OUTPUT: str
Return a str containing each key and value in dict d. Keys and values are
separated by a colon and a space. Each key-value pair is separated by a new
line.
For example:
a: 1
b: 2
For nice pythonic code, use iteritems!
Note: ... | true |
b350d4fc0a75b1e745d7d4dfd0d3eb29a8c121df | MykolaPavlenkov/Pavlenkov | /HomeWork/HomeWork1/task#6.py | 779 | 4.375 | 4 | x = int(input ('Введите с клавиатуры целое число x: '))
y = int(input ('Введите с клавиатуры целое число y: '))
print("1) Вывести на экран консоли оба числа используя только один вызов print ")
print (x,y)
print("2) вывод суммы чисел x + y =")
c = x + y
print (c)
print("3) Выполнить целочисленное деление с помощью опер... | false |
360f00f7d38fa89588606cf429e0c1e9321f8680 | mounika123chowdary/Coding | /cutting_paper_squares.py | 809 | 4.1875 | 4 | '''Mary has an n x m piece of paper that she wants to cut into 1 x 1 pieces according to the following rules:
She can only cut one piece of paper at a time, meaning she cannot fold the paper or layer already-cut pieces on top of one another.
Each cut is a straight line from one side of the paper to the other side of t... | true |
12b9d7a90eb7d3e8fbec3e17144564f49698e507 | BenjaminNicholson/cp1404practicals | /cp1404practicals/Prac_05/word_occurrences.py | 401 | 4.25 | 4 | words_for_counting = {}
number_of_words = input("Text: ")
words = number_of_words.split()
for word in words:
frequency = words_for_counting.get(word, 0)
words_for_counting[word] = frequency + 1
words = list(words_for_counting.keys())
words.sort()
max_length = max((len(word) for word in words))
for word in wo... | true |
f130de72784cf53cf392a96a8cf09c111474bf5c | BenjaminNicholson/cp1404practicals | /cp1404practicals/Prac_05/hex_colours.py | 528 | 4.28125 | 4 | COLOURS = {'AliceBlue': '#f0f8ff', 'Aquamarine1': '#7fffd4', 'AntiqueWhite': '#faebd7', 'azure1': '#f0ffff',
'aquamarine4': '#458b74', 'azure4': '#838b8b', 'blue1': '#0000ff', 'BlueViolet': '#8a2be2',
'brown3': '#cd3333'}
print(COLOURS)
choice = input("Which colour do you want to pick? ")
while ... | false |
a44221832be1eece6cbcbd78df99a8dcc4aea9ab | mcampo2/python-exercises | /chapter_03/exercise_04.py | 539 | 4.59375 | 5 | #!/usr/bin/env python3
# (Geometry: area of a pentagon) The area of a pentagon can be computed using the
# following formula (s is the length of a side):
# Area = (5 X s²) / (4 X tan(π/5))
# Write a program that prompts the user to enter the side of a pentagon and displays
# the area. Here is a sample run:
# En... | true |
66106c9065c8dcabaa8a094326a2b601cdf07524 | mcampo2/python-exercises | /chapter_03/exercise_11.py | 523 | 4.34375 | 4 | #!/usr/bin/env python3
# (Reverse numbers) Write a program that prompts the user to enter a four-digit int-
# ger and displays the number in reverse order. Here is a sample run:
# Enter an integer: 3125 [Enter]
# The reversed number is 5213
reverse = ""
integer = eval(input("Enter an integer: "))
reverse += str(... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.