Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,152,133 members, 7,814,963 topics. Date: Thursday, 02 May 2024 at 02:19 AM

Help With This Python Program - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Help With This Python Program (601 Views)

A Python Program To Check The Risk Of Corona Virus. / Help! How To Make Your Java Or Python Program Become A Real Android App? / How To Run Python Program On Android (2) (3) (4)

(1) (Reply) (Go Down)

Help With This Python Program by iDRAW(m): 11:09am On Mar 11, 2022
It's my first time learning python. I was following along with a tutorial on youtube.
I did exactly what I saw but got an error message.

Where did I go wrong? Please help.

Thanks

Re: Help With This Python Program by MCKitchen(f): 11:37am On Mar 11, 2022
Input=days("20 days in 50 minutes")
Print(days)
Re: Help With This Python Program by iDRAW(m): 12:08pm On Mar 11, 2022
MCKitchen:
Input=days("20 days in 50 minutes"wink
Print(days)

There's nothing wrong with the code. Only that my interpreter was set to version 2.7 while the code is recognized in 3.6+

I know this through a Facebook page. Thanks for your input. You are appropriated
Re: Help With This Python Program by Jaguarspaw: 2:53pm On Mar 11, 2022
20 days are {}.format(50) python 2

f"20 days are {}" python 3
Re: Help With This Python Program by Jaguarspaw: 3:00pm On Mar 11, 2022
MCKitchen:
Input=days("20 days in 50 minutes"wink
Print(days)

where did you get this lol

1 Like

Re: Help With This Python Program by Deicide: 3:21pm On Mar 11, 2022
what you did is correct. Type python -v on your terminal and send it here.

Edit: Just saw now that you figured it out.

2 Likes

Re: Help With This Python Program by Sapeleboy911(m): 7:00pm On Mar 11, 2022
MCKitchen:
Input=days("20 days in 50 minutes"wink
Print(days)
Silent would have been golden in this case. Because you would have ended up worsening his case.
Re: Help With This Python Program by SqueezedPant: 10:04pm On Mar 11, 2022
iDRAW:
It's my first time learning python. I was following along with a tutorial on youtube.
I did exactly what I saw but got an error message.

Where did I go wrong? Please help.

Thanks


is this Linux or Mac?
Re: Help With This Python Program by LikeAking: 1:10am On Mar 12, 2022
Good luck.

1 Like

Re: Help With This Python Program by iDRAW(m): 6:47pm On Mar 13, 2022
SqueezedPant:



is this Linux or Mac?

I use a MacBook Pro
Re: Help With This Python Program by WrksOnMyMachine: 11:59pm On Mar 13, 2022
Avoid hardcoding variables/params that can change.


total_mins = 50
nos_of_days = 20

print(f"{nos_of_days} days are {total_mins} minutes"\)

1 Like

(1) (Reply)

Over 1m IT Professionals Needed To Tackle Cyber Threat — Cisco / I Need Urgent Help / FB STUFFS: In Need Of Help!

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 9
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.