0% found this document useful (0 votes)
15 views

Brocode

The document contains Python code that performs various operations including: 1) Printing variables of different data types like integers, floats, strings, and Booleans. 2) Performing string methods like finding length, uppercase, lowercase, etc. 3) Basic math operations and functions like maximum, square root. 4) Name, age, and height input from users and printing outputs. 5) Conditional statements to check temperatures and ages. 6) A while loop to continuously prompt for name input until a non-empty string is entered.

Uploaded by

PlanckSigma Edu
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views

Brocode

The document contains Python code that performs various operations including: 1) Printing variables of different data types like integers, floats, strings, and Booleans. 2) Performing string methods like finding length, uppercase, lowercase, etc. 3) Basic math operations and functions like maximum, square root. 4) Name, age, and height input from users and printing outputs. 5) Conditional statements to check temperatures and ages. 6) A while loop to continuously prompt for name input until a non-empty string is entered.

Uploaded by

PlanckSigma Edu
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

#height=20.

4
#print("height = "+str(height)+"cm")

#human = False
#print(human)
#print(type(human))

#name = "bro"
#age = 21
#attractive = True
#print(name)
#print(age)
#print(attractive)
#print()

#name, age, attractive = "bro", 21, True


#print(name,age,attractive)

#size=age=length=30

#name="Bro"
#age = "30"
#print(len(name))
#print(name.find("r"))
#print(name.capitalize())
#print(name.upper())
#print(name.lower())
#print(name.isdigit())
#print(age.isdigit())
#print(name.isalpha())
#print(name.count("o"))
#print(name.replace("o","e"))
#print(name*3)

#x = 1
#y = 2.0
#z = "3"
#str(x)
#z= int(z)
#print(x)
#print(int(y)
#print(z*3)
#z = int(z)
#print(z*3)
#x=float(x)
#y=float(y)

#name = input("name: ")


#age=int(input("your age :"))
#height = float(input("height = "))
#age = age + 1
#print("my name is "+name)
#print("you are "+str(age)+"years old")

#import math
#pi=3.14
#x=1
#y=2
#z=3
#print(round(pi))
#print(math.ceil(pi))
#print(math.floor(pi))
##print(abs(pi))
#print(pow(pi,2))
#print(math.sqrt(420))
#print(max(x,y,z))

#name = "JOHN HENRY ARDI TANOYO"


#first_name = name[0]
#print(first_name)
#first_name =name[0:3]
#print(first_name)
#last_name = name[4:20:2]
#print(last_name)
#fungky_name=name[::2]
#reverse_name= name[::-1]
#website = "www.gone.com"
#slice=slice(3,-4)
#print(website[slice])

#age = int(input("your age = "))


#if age==100 : print('your adult')
#elif age >=18 : print('century')
#elif age<0 : print('have not born')
#else : age<18 : print('a child')

#temp = int(input("temperature = "))


#if temp >=0 and temp <= 30 : print("the temp is good")
#elif temp < 0 or temp >30 : print("is extreme")
#if not (temp>=0 and temp )
#elif not

name = ""
name = input(" your name?")
while len(name)== 0 :
name = input(" your name?")
print('enter name pls =>')
print("hello"+name)

You might also like