0% found this document useful (0 votes)
18 views2 pages

Python Coding

The document is a Python code that asks the user a series of questions and prints responses based on the user's input. It asks for the user's name, favorite game, description of the weather, how school is, and the costs of lunch items to calculate and print the total lunch cost. Conditionals and input are used to direct the response printed.

Uploaded by

Joseph
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views2 pages

Python Coding

The document is a Python code that asks the user a series of questions and prints responses based on the user's input. It asks for the user's name, favorite game, description of the weather, how school is, and the costs of lunch items to calculate and print the total lunch cost. Conditionals and input are used to direct the response printed.

Uploaded by

Joseph
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

name=input(“What is your name?

”)

greeting=”nice to meet you”

print(greeting+name)

print(My name is Pedro!)

game=input(“What is your favourite game?”)

if game==”fortnite”:
print(“SAME!!”)

else:
print(game+”is a good game but I prefer fortnite”)

weather=input(“What is the weather like?:”)

if weather==”raining”:
print(“Take an umbrella”)

elif weather==”cold”:
print(“Take a coat!”)

elif weather==”sunny”:
print(“Take sunglasses”)

else:
print(“Have a good day, whatever the weather!”)

school=input(“How is school?:)

if school==”good”:

print(“good good”)

elif school==”bad”:

print(“oh no”)

else:

print(“cool”)

main=int(input(”What is the cost of your main meal?”))

juice=int(input(“What is the cost of your juice?”))

fruit=float(input(“What is the cost of your fruit?))

total=main+juice+fruit

print(“Total for lunch:”,total)

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy