nighthawkcoders / teacher

Jupyter Notebooks and Posts dedicated to learning Python
MIT License
0 stars 63 forks source link

P1 Data Abstraction | Compci Blogs #21

Open utterances-bot opened 1 year ago

utterances-bot commented 1 year ago

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

SriS126 commented 1 year ago

https://sris126.github.io/student//basics/home

SriS126 commented 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

Djxnxnx commented 1 year ago

https://djxnxnx.github.io/student//5.a/c4.1/2023/10/04/lesson1homework_IPYNB_2_.html

tarunja1ks commented 1 year ago

https://tarunja1ks.github.io/student//2022/10/09/Homework1DataAbstract_IPYNB_2_.html

TejM123 commented 1 year ago

https://tejm123.github.io/student//5.a/c4.1/2023/10/04/lesson1HW_IPYNB_2_.html

shuban-789 commented 1 year ago

My homework https://github.com/shuban-789/student/_notebooks/2023-10-03-datatypeshw.ipynb

shuban-789 commented 1 year ago

(link works) homework https://github.com/shuban-789/student/blob/main/_notebooks/2023-10-03-datatypeshw.ipynb

abby-albert commented 1 year ago

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)

Sreejarai123 commented 1 year ago

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)

tanvim-18 commented 1 year ago

var1 = "hello," var2 = "how are you"

print(var1, var2)

var1 = 7 var2 = 9 var3 = 2 var4 = 8 VAR = [var1, var2, var3, var4] print(VAR)

Nupurbb commented 1 year ago

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)

abby-albert commented 1 year ago

num1Int = 10 num2Int = 15 print(num1Int+num2Int)

Flying-Book commented 1 year ago

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)

devaSas1 commented 1 year ago

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)

nitinsandiego commented 1 year ago

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

variable1 = 7 variable2 = 9 variable3 = 2 variable4 = 8 list = [variable1, variable2, variable3, variable4]

SrinivasNampalli commented 1 year ago

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)

Tanuj253 commented 1 year ago

First block

var1 = 7 var2 = 9 var3 = 2 var4 = 8 VAR = [var1, var2, var3, var4] print(VAR)

Second block

float1 = 10 float2 = 2 print(float1/float2)

Third block

var1 = 7 var2 = 9 var3 = 2 var4 = 8 VAR = [var1, var2, var3, var4] print(VAR)

Fourth block

var1 = "hello," var2 = "how are you" print(var1, var2)

spooketti commented 1 year ago

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"""

Nathaniel633 commented 1 year ago

variable1 = 7 variable2 = 9 variable3 = 2 variable4 = 8

result_string = f"variable1 = {variable1} variable2 = {variable2} variable3 = {variable3} variable4 = {variable4}"

print(result_string)

RayyanDarugar commented 1 year ago

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)

DavidL0914 commented 1 year ago
  1. num1Int = 10 num2Int = 5

sum_result = num1Int + num2Int

print("Sum:", sum_result)

  1. 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)

ChrisP121 commented 1 year ago

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)

ShakeSphereStuff commented 1 year ago

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

tarunja1ks commented 1 year ago

https://tarunja1ks.github.io/student//2022/10/09/Homework1DataAbstract_IPYNB_2_.html

parkib commented 1 year ago

greeting = "hello," question = "how are you"

print(greeting, question)

num1 = 7 num2 = 9 num3 = 2 num4 = 8 numbers = [num1, num2, num3, num4] print(numbers)

SOoctosnake commented 1 year ago

https://sooctosnake.github.io/student_october//2023/10/04/data_abstraction.html

vidhaganji commented 1 year ago

Define variables for the name and time of day

name = "John" time_of_day = "morning"

Create a greeting using the variables

greeting = f"Good {time_of_day}, {name}!"

Print the greeting

print(greeting)