Open utterances-bot opened 1 year ago
https://sris126.github.io/student//2023/09/08/DataAbstractionsHW_IPYNB_2_.html
Accidently sent the wrong link in previous comment, pls ignore and look at the one above
(link works) homework https://github.com/shuban-789/student/blob/main/_notebooks/2023-10-03-datatypeshw.ipynb
var1 = 7 var2 = 9 var3 = 2 var4 = 8 VAR = [var1, var2, var3, var4] print(VAR)
float1 = 10 float2 = 2 print(float1/float2) var1 = 7 var2 = 9 var3 = 2 var4 = 8 VAR = [var1, var2, var3, var4] print(VAR)
var1 = "hello," var2 = "how are you" print(var1, var2)
var1 = 7 var2 = 9 var3 = 2 var4 = 8 VAR = [var1, var2, var3, var4] print(VAR)
float1 = 10 float2 = 2 print(float1/float2) var1 = 7 var2 = 9 var3 = 2 var4 = 8 VAR = [var1, var2, var3, var4] print(VAR)
var1 = "hello," var2 = "how are you" print(var1, var2)
var1 = "hello," var2 = "how are you"
print(var1, var2)
var1 = 7 var2 = 9 var3 = 2 var4 = 8 VAR = [var1, var2, var3, var4] print(VAR)
hw: var1 = "hello," var2 = "how are you"
print(var1, var2)
var1 = 7 var2 = 9 var3 = 2 var4 = 8 VAR = [var1, var2, var3, var4] print(VAR)
num1Int = 10 num2Int = 15 print(num1Int+num2Int)
var1 = 7 var2 = 9 var3 = 2 var4 = 9 variable_list = [var1, var2, var3, var4] print(variable_list)
age = 15 name = "Anusha" year = "sophmore" print("Hello, I am " + name + " and, I am " + str(age) + " years old." + " I am a " + year)
message = "Hi. My name is {} and I am {} years old" formatted_message = message.format(name, age) print(formatted_message)
https://github.com/devaSas1/student/blob/main/_notebooks/2023-08-11-DataAbstraction.ipynb
variable1 = 7 variable2 = 9 variable3 = 2 variable4 = 8 lst = [variable1, variable2, variable3, variable4] print(lst)
num1 = 5 12:00 num2 = 6 12:00 print(num1+num2) 12:00 float1 = 5.0 12:00 float2 = 2.5
12:00 print(float1/float2) (edited) 12:02 message = “Hello {name1} and {name2}! How can I assist you today?” name1 = “John” name2 = “Alice” formatted_message = message.format(name1=name1, name2=name2) print(formatted_message)
variable1 = 7 variable2 = 9 variable3 = 2 variable4 = 8 list = [variable1, variable2, variable3, variable4]
num1Int = 10 num2Int = 20
sum_result = num1Int + num2Int
print("The sum of", num1Int, "and", num2Int, "is:", sum_result)
float1 = 3.5 float2 = 2.0
quotient = float1 / float2
print("The quotient of", float1, "and", float2, "is:", quotient)
message = "My name is {} and I am a {}."
name = "Srinivas" occupation = "software engineer"
formatted_message = message.format(name, occupation) print(formatted_message)
var1 = 7 var2 = 9 var3 = 2 var4 = 8 VAR = [var1, var2, var3, var4] print(VAR)
float1 = 10 float2 = 2 print(float1/float2)
var1 = 7 var2 = 9 var3 = 2 var4 = 8 VAR = [var1, var2, var3, var4] print(VAR)
var1 = "hello," var2 = "how are you" print(var1, var2)
num1Int = 3 num2Int = 4 print(num1Int + num2Int)
float1 = 2.0 float2 = 7.0 print(float2/float1)
phold1 = "eat" phold2 = "sunday" print(f"i like to {phold1} bananas every {phold2}")
print("hello")
"""jonathan liu"""
variable1 = 7 variable2 = 9 variable3 = 2 variable4 = 8
result_string = f"variable1 = {variable1} variable2 = {variable2} variable3 = {variable3} variable4 = {variable4}"
print(result_string)
var1 = 7 var2 = 9 var3 = 2 var4 = 8 varsList = [var1, var2, var3, var4] print(varsList)
float1 = 10.0 float2 = 2.0 print(float1/float2)
greeting = "hello," question = "how are you" print(greeting, question)
num1Int = 10 num2Int = 5
sum_result = num1Int + num2Int
print("Sum:", sum_result)
float1 = 7.5 float2 = 2.0
quotient_result = float1 / float2
print("Quotient:", quotient_result)
3. message = "My name is {}, and I live in {}."
name = "David" location = "San Diego"
formatted_message = message.format(name, location) print(formatted_message)
4. var1 = 7 var2 = 9 var3 = 2 var4 = 8
varsList = [var1, var2, var3, var4] print(varsList)
1. num1Int = 5 num2Int = 10
sum_result = num1Int + num2Int
print("The sum of num1Int and num2Int is:", sum_result) 2. float1 = 3.0 float2 = 1.5
quotient = float1 / float2
print("The quotient of float1 and float2 is:", quotient) 3. message = "Hello, {}! How are you doing, {}?"
name1 = "Tim" name2 = "Bob"
print(message.format(name1, name2)) 4. user_name = input("What is your name? ")
greeting = "Hello, {}! Welcome.".format(user_name)
print(greeting)
import random name = input("What's your name?") continueGreet = True selectedGreeting = 0 result = "" Greetings = [["Hello", "State"], ["Hi there", "State"], ["How are you doing", "Quest"]] def greeting(): global result, selectedGreeting, Greetings selectedGreeting = random.randint(0, len(Greetings) - 1) if(Greetings[selectedGreeting][1] == "Quest"): print("\t" + Greetings[selectedGreeting][0] + " " + name + "?") result = Greetings[selectedGreeting][0] + " " + name + "?" elif(Greetings[selectedGreeting][1] == "State"): print("\t" + Greetings[selectedGreeting][0] + " " + name) result = Greetings[selectedGreeting][0] + " " + name else: print("INVALID GREETING")
greeting()
while(continueGreet == True): global result, selectedGreeting, Greetings isRight = input("Do you like this greeting? Y/N: ") if(isRight.upper() == "N"): del Greetings[selectedGreeting] if(len(Greetings) == 0): print("There are no more greetings, try adding 1 to the system, or pick one provided") continueGreet = False else: greeting() continueGreet = True elif(isRight.upper() == "Y"): continueGreet = False print(result) else: print("Invalid") continueGreet = True
greeting = "hello," question = "how are you"
print(greeting, question)
num1 = 7 num2 = 9 num3 = 2 num4 = 8 numbers = [num1, num2, num3, num4] print(numbers)
name = "John" time_of_day = "morning"
greeting = f"Good {time_of_day}, {name}!"
print(greeting)
P1 Data Abstraction | Compci Blogs
3.1.1 - What are variables Sharon Kodali
https://nighthawkcoders.github.io/teacher/2023/10/03/P1_data_abstraction_IPYNB2.html